The Open Source Swiss Army Knife

/unix/unix_editors/sed/
/unix/unix_editors/sed/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /unix   /unix_editors   /sed 
Permalink: ex_commands.txt
Title: add
article options : please login   |  raw source view  

#!/bin/sh
# from the O'Reilly vi book chapter 7 section 4
# on how to run an ex commands from a bash script
# wont' need to open vi on all the files and repeat these substitutions
# on each file anymore!!
for file in $*
do
ex - $file << end-of-script
g/thier/s//their/g
g/writeable/s//writable/g
wq
end-of-script
done


Leave a Reply
Your Name:     anonymous
Your Email:
Website:  
Comments:

The author will be notified of your reply.
return to top