[CDBUG-talk] OT: script help
doon at inoc.net
Wed May 12 09:17:45 EDT 2010
Try using the exec option to find as opposed to printing and pipe. While I do have sed on my phone :) typing on the small keybaord is a bit rough. I pretty sure I have an example of this on my laptop...
Typed with only my thumbs on a Palm Pre...
On May 12, 2010 9:07, Jonathan Franks <jonathan.franks at gmail.com> wrote:
I'm writing a little sed script to append a few lines to a file and I've run in to a problem. The script looks like this:
find ./ -type f -name 'FileToFind' -print | while read i
sed -i[bak] '$a\
stuff to append\
more stuff to append' $i
It works fine in testing, however in practice the absolute path to the file(s) contains a directory with a space in the name (Thanks, Apple...).
Anyone know of a way to have the path sent to sed in quotes?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the CDBUG-talk