Marcus Claesson wrote:
>
> I settled for the simplest of them all, by single quoting the shell
> variables:
>
> > perl -wne 'if (/'$FILENAME'/) { s/\d{4}-\d{2}-\d{2}/'$UPDATED'/;print;
> > }' updated_files.txt
Actually, you are single quoting the perl program. The shell variables
are outside the quotes or it wouldn't work at all. :-)
> The reason I use bash here and not only good old perl is that the bash
> script is much bigger and does other things as well. I wanted a simple
> 'sed' command but couldn't make it work so I used that command-line perl
> instead.
You have to be careful with that because both the shell and perl do
interpolation.
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]