gargamel100
Technical User
Hi all,
using the line bellow
ls -l | awk ' { if ( $8~/^(0|1|2|3)/) print $8 }'
I have output like
01
02
03
04
05
06
07
08
09
10
11
12
and so on .... this is column which represent days of month.
I wish if it is possible using script that will cd 01 then in that directory do
d=`TZ=MET+24 date +%Y%m%d`
ls -l | awk ' { if ($8 ~ /^(aba)/) print $8 }' | wc -l >> top_$d.txt
wc -l *.cdr | grep total >> top_$d.txt
cd .. ( to main directory )
then cd 02 do again same and so on to cd 31 or ( 28 or 31 )
My question is how push code to do this
I have some ideas using for loop but I do not understant what to put as arguments inside for body.
If somebody know please write it down.
Regards
using the line bellow
ls -l | awk ' { if ( $8~/^(0|1|2|3)/) print $8 }'
I have output like
01
02
03
04
05
06
07
08
09
10
11
12
and so on .... this is column which represent days of month.
I wish if it is possible using script that will cd 01 then in that directory do
d=`TZ=MET+24 date +%Y%m%d`
ls -l | awk ' { if ($8 ~ /^(aba)/) print $8 }' | wc -l >> top_$d.txt
wc -l *.cdr | grep total >> top_$d.txt
cd .. ( to main directory )
then cd 02 do again same and so on to cd 31 or ( 28 or 31 )
My question is how push code to do this
I have some ideas using for loop but I do not understant what to put as arguments inside for body.
If somebody know please write it down.
Regards