t006sfh
03-04-03, 19:12
| Hi there!!! My problem is the following: I am traying to made a script that should do the following: 1. Get from the system the Current month (e.g. Apr) 2. Get from the system the Current date (e.g. 02) 3. Concatenate those 2 values (e.g. Apr 02) 4. Then list the files that are in a certian directory an then grep them in order to get only the files that were updated only that date and create a file with the list of the files grepped The script that I made is the following: ##Start## month=`date +'"%h '` date=`date +'%d"'` time=$month$date ls -lt /pusa/nchs/bdr55/data/trace/*1200*|grep $time > /tmp/text ##End## Everytime that i run it, it failed with the following messahe: grep: 0652-033 Cannot open 04". when I ran the command manually, without variables its ran perfectly: ls -lt /pusa/nchs/bdr55/data/trace/*1200*|grep "Abr 02" > /tmp/text Could you please help on this issue?? what is wrong???? Thanks in advance, Freddy |