If $3 (count) is 5 then execute the script testit.ksh with $1=20060228 , using script testit.ksh 20060228
and if $3 is 5 then $2=20060227 and move files *.20060227.* to /DAT2/
I use awk because I want to findout $3 is 5, then take $1 and $2, I really dont know what will be $1 and $2 .Just use it to move or execute another script
Hi vgersh99,
Because this myFile.txt have along list and I am sure it have cnt is = 5, then take that $1 is d1 at $2 is d2. So I update your code like this but it copy every thing to DATA2 directory and somehow it can not execute the testit.ksh. Any idea ?
Oh I am a newbie so what make it work then I do it . I tried your code but some how I keep geting all of the file move to DATA2 instead of the files have 5 counts. Sorry for my English..
From this forum I have learned alot from you and the other.
Good site and thanks for sharing vgersh99
could you post a sample of your date.txt file, pls
Also it might be a good idea to start posting using vB codes so that we get properly formated samples.
Yes, I use this script to clean up my directory and archive files . At first I get all the date of the files and sort it then uniq it to a date.txt file, then I process all of the files before 5 count, to move it out of directory, they suppose to have all 5. not 1 and 2 like I test