Re: Comparison of a string and filename

2001-07-18 Thread Rachel Coleman
On Wed, 18 Jul 2001, Arvind Baldeo wrote: > As can be seen above, both $filename and $myfile are same, but it fails when > I test using the ($myfile eq $filename) operator in the script. > > Any suggestions? First: you are chomping $filename, but putting a newline in $myfile. Second: use -w and s

Comparison of a string and filename

2001-07-17 Thread Arvind Baldeo
Hi, I wrote a script to check if the last file has correct filename. using `ls -rt |tail -2` I retrieve the $filename to be 2001.07.18.14.data and using my script, I calculate the $myfile using the date cmd. and $myfile also gives me 2001.07.18.14.data As can be seen above, both $filename and