read and write to same file

2002-04-08 Thread Arvind Baldeo
Hi All, Can some one please look at my code ad see what I am doing wrong. For some reason it is not working. The idea is to search the file using the commandline argument. It is supposed to read the file and if a match is found, it outputs to another file. If a match is not found is appends th

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

2 digit numeric

2001-07-17 Thread Arvind Baldeo
Hi, I need to output my result as two digit numeric. eg $curr = 00; $hour =4; $new=$curr * $hour; print $new; In the above eg, my result is $new equals to 4. I need it to be displayed as 04. Or how to convert the digit 4 to string 04? Rgds Arvind -- To unsubscribe, e-mail: [EMAIL PROTECTE