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...<br><br>Patrick<br><br><span style="font-family:Prelude, Verdana, san-serif;"><br><br></span><span id="signature"><div style="font-family: arial, sans-serif; font-size: 12px;color: #999999;">--</div>Patrick Muldoon<br>Network/Software Engineer<br>INOC<br><br>Typed with only my thumbs on a Palm Pre...<br></span><span style="color:navy; font-family:Prelude, Verdana, san-serif; "><hr align="left" style="width:75%">On May 12, 2010 9:07, Jonathan Franks <jonathan.franks@gmail.com> wrote: <br><br>Hey guys,<br><br>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:<br><br>#! /bin/sh<br><br>find ./ -type f -name 'FileToFind' -print | while read i<br>
do<br> sed -i[bak] '$a\<br>stuff to append\<br>more stuff to append' $i<br>done<br><br>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...). <br>
Anyone know of a way to have the path sent to sed in quotes? <br><br>-Jonathan<br>
</span>