06-30-2008
11,
0
Join Date: Dec 2007
Last Activity: 14 October 2010, 2:50 PM EDT
Posts: 11
Thanks Given: 0
Thanked 0 Times in 0 Posts
Need Help!!!!!
Hey all,
I am trying to to attempt the following.
I need to check driver information within log files to make sure that all of the machines that the logs come from are up to date.
I am basically calling the filenames from the db, then unzipping just the logfile from each and grepping for a specific ver#. If it doesnt match it should email me with info that I need.
I cannot figure out how to unzip each package 1 at a time and grep for the version number. Please see my code and let me know what I might be doing wrong (outside of trying to take this project on). Thanks in advance:
if [ -f /tmp/out ]
then
mv /tmp/out /tmp/checkforgf >/dev/null 2>&1
#unzip -l /tmp/checkforgf | grep -i wowly.log>/dev/null 2>&1
unzip /tmp/checkforgf wowly.log
grep -i PDD-1.1-20080424151646 /tmp/goldfinch.log>/dev/null 2>&1
if [ ! $? = 0 ]
then
echo $apptid >> /tmp/mySessions.txt
fi
fi
It doesnt work right:
Archive: /tmp/checkforgf
inflating: goldfinch.log
Archive: /tmp/checkforgf
replace *.log? [y]es, [n]o, [A]ll, [N]one, [r]ename: error: invalid response [ ]
replace *.log? [y]es, [n]o, [A]ll, [N]one, [r]ename: error: invalid response [2]
Any suggesstions?