1.

Solve : any examp. how check if alll.txt there after unzip?

Answer»

Can anybody please give me some shell script EXAMPLE of how to make sure all 13 NEEDED .txt are EXISTED after unzipping the file.
THANK YOU !! not very sure what you actually want..

#!/bin/sh
numtest=13
fullpath=/someunzipdir
#....
# doing UNZIP
#....
# check for unzip successful
if [ $? -NE 0 ];then
exit
fi

unzipnum=`ls -1 $fullpath/*.txt | wc -l`
if [ $unzipnum -eq $num ]; then
echo "all files there"
fi
THANK YOU !!
It may help ...
I know that .zip file should have 13 .txt files, I need to have logic to be sure that all 13 files were sent
(zipped )



Discussion

No Comment Found