Your code actually works for me!

I tried it with some sample files I created and it worked as it
should, replacing the string with % in each file.

Perhaps your shell has trouble understading *.ly.

Try

for fl in `ls *.ly`; do
..

also, the
sed --in-place 's/barNumberCheck/%/g'  $fl
suggestion by Dan is also a good Idea if you don't need to keep the
original files :)

Alex

On 8/28/06, Aaron Mehl <[EMAIL PROTECTED]> wrote:
Hi all,

I have sed finding and replacing for me. Thanks to Alex and Tzafrir for
your help :)


but I need to do it for a whole directory of files.

I found a script that uses sed for another recursive task and tried to
substitute my replace script, but alas it didn't work.

--------------------------------
for fl in *.ly; do
        mv $fl $fl.old
        sed 's/barNumberCheck/%/g' $fl.old > $fl
        #rm -f $fl.old
done
-------------------------------------------

I realize I am doing this as a parrot exercise, but presently I have few
other choices, and if it had worked......

I wouldn't be writing this email :)


Any help would be most appreciated.

Thanks,
Aaron


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




--
|
| Alex Alexander :: +30 693 8778114
| Linux :: Debian :: 2.6.17 :: KDE 3.5.4
| www.justaeuro.com
\

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to