Put your message here! Contact me for more information
 
 







 

Posts Tagged ‘invalid command code’


 

I needed to update “../../lib/prototype.js” in all html files in the folder to “../../prototype.js”.  Since sed is installed by default in Mac OS X (I’m using Snow Leopard), this is a one-liner:

sed -i “” ’s/lib\/prototype/prototype/g’ *.html

Notice the “” after the -i params.  This is to replace the existing files with the updated files. Neat!

If you get “invalid command code” when you run sed, you probably miss the empty double-quote “” pair after the -i.  Sed on the Mac has slight different in terms of syntax so you need to have the empty double-quote pair.

view comments