Newbies neoplot Posted August 19, 2008 Newbies Posted August 19, 2008 (edited) pls can anyone help me with this script, the script is below, i need the script to get the previous month result every new month , the problem is that the loop has to be automated to always calculate for previous month . a=`date "+%Y"` #this year to be used b=$(date "+%Y%m" --date='49 days ago') #previous month with year to be used for i in 49 48 47 46 45 44 43 42 41 40 39 38 37 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 do g=$(date "+%Y%m%d" --date=''$i' days ago') # n days ago to be used h="lic"$g*405*.txt #the file name cd /home/file/lic$a/$b #the directory #---------- Count information----------# cat $h|awk -F '|' '$4 ~ /^700[0]/ && $9 == '0' { print $0 }'|awk -F '|' '{ b = count[$1]++; }''{ print b }' >> result$b.txt done Edited August 19, 2008 by Guest
Fitch Posted August 21, 2008 Posted August 21, 2008 FileMaker 3 on Linux? Please explain what you want to accomplish and clarify your version/platform.
Recommended Posts
This topic is 5936 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now