0
I run the following:
for i in `ls -ld /u03/sss/| awk '{print $9}'`
do
echo $i
for j in `find $i -name "*.gz" | grep $send_sysdate`
do
count=`gunzip -c $j | wc -l`
sum5=`expr $sum5 + $count`
done
#echo $sum5
echo "Transaction count for Socal Server Last month is $sum5 \n">> /tmp/count.txt
done
After the above runs for a while I receive:
./Transaction_count_prashantN.sh[33]: no space
./Transaction_count_prashantN.sh[33]: no space
./Transaction_count_prashantN.sh[33]: no space
./TranMemory fault
have you check if
/tmp
is full ? this might be reported byerrpt
. – Archemar – 2015-10-02T14:34:32.557Try to find which is the command that cause the error... maybe in
/u03/sss/
there are million of directories, or million ofgz
files in one of that, or million of files inside agz
file. BTW you are appending to/tmp/count.txt
something related to the whole last month one time for each value of$i
. If you want to add only the total you should put the last done before the echo line. – Hastur – 2015-10-02T16:01:45.070