On Mon, Aug 28, 2006 at 08:53:58PM +0300, Aaron Mehl 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
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]
>
Hi,
Does your script choke telling you that it has no idea who is
$fl.old ?
My guess is that the correct syntax for what you intended to do
is:
for fl in *.ly; do
mv $fl ${fl}.old
sed 's/barNumberCheck/%/g' ${fl}.old > $fl
#rm -f ${fl}.old
done
Cheers, Avraham
=================================================================
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]