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 th
Thanks for all your answers!
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
The reason I use bash here and not only good old perl is that the bash
script is much bigger
Marcus Claesson wrote:
>
> Hi!
Hello,
> I have a problem with variables when using command-line perl in a bash
> script. The script should update a date (in 2003-10-10 form) if the
> argument, which is a file name, exists on the same line in the file
> updated_files.txt.
>
> #!/bin/bash
> FILEN
On Thursday, Nov 27, 2003, at 10:04 US/Pacific, Marcus Claesson wrote:
Hi!
I have a problem with variables when using command-line perl in a bash
script. The script should update a date (in 2003-10-10 form) if the
argument, which is a file name, exists on the same line in the file
updated_files.t