elif [[ $i =~ $reg3 ]] ; then
base=`basename $i .gz`
dest=`dirname $i`
(cd $dest; /usr/bin/gunzip $base)
if [ -f $dest"/"$base".log" ]
then
olist=$olist" "$dest"/"$base".log"
else
echo $i" did not produce a log file" >>$LTEST
fi
Here is the script,and implementing on windows environment
Last Wiki Answer Submitted: December 21, 2009 4:45 pm by Twiki40 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
What’s the operating system ?
Is this a file you are compressing to distribute ? if so, why don’t you assign the ‘log’ extension to it before compressing it ?
The more details you provide, the better chances to get useful responses.
It comes from a different server in the compressed format,my script then need to uncompress and process the file.
Implementing these lines on window .
elif [[ $i =~ $reg3 ]] ; then
base=`basename $i .gz` # get the basic file name
dest=`dirname $i` # get the directory path
(cd $dest; /usr/bin/gunzip $base) #execute the gz extract command
if [ -f $dest"/"$base".log" ] # check if we got log file
then
olist=$olist” “$dest”/”$base”.log” # add the file to the awk file list
else
echo $i” did not produce a log file” >>$LTEST
fi
More details are needed.
What’s the operating system ?
Is this a file you are compressing to distribute ? if so, why don’t you assign the ‘log’ extension to it before compressing it ?
The more details you provide, the better chances to get useful responses.
It comes from a different server in the compressed format,my script then need to uncompress and process the file.
Implementing these lines on window .
elif [[ $i =~ $reg3 ]] ; then
base=`basename $i .gz` # get the basic file name
dest=`dirname $i` # get the directory path
(cd $dest; /usr/bin/gunzip $base) #execute the gz extract command
if [ -f $dest"/"$base".log" ] # check if we got log file
then
olist=$olist” “$dest”/”$base”.log” # add the file to the awk file list
else
echo $i” did not produce a log file” >>$LTEST
fi
That’s a Unix script. How are you implementing that on windows ?
I execute the script through CYGWIN