Friends
I m tryin to write a script to collect the logs from iqmsg file as the file is to large i hav to grep the log messages of particular time.
The format of the messages in the file is as
06/11 20:00:00......................
i wrote the script as following
dir1=/sybasedata/sybase
iqmsg=`date +%m`/`date +%d`
temp=`date +%H`
echo $temp
temp2=' '
temp1='"'$iqmsg$temp2$temp'"'
echo $temp1
echo $iqmsg
dir2=$dir1/mydb.iqmsg
#echo $dir2
grep $test1 $dir2 > /opt/sybase/SCRIPTS/logs/iqmsglog
o/p of echo is "06/11 14"
when i use
$ grep "06/11 14" /sybasedata/sybasemydb.iqmsg >/opt/sybase/SCRIPTS/logs/iqmsglog
it greps the required information into /opt/sybase/SCRIPTS/logs/iqmsglog
but when i tried to do the same thing from inside the script it gives me the error:
grep: 0652-033 Cannot open 20".
can anybody help me in this i am using AIX OS.
