Reborg,
I ran the script as I got some time now and It seems it is not taking the value of the variable dev at all. I made sure that there are no spaces between the assignment of the variable value
cd='/biddf/ab6498/dev/bin' I am doing something wrong here.
Please see the out put:
Quote:
+ + /biddf/ab6498/dev/ctl
./awksatya.ksh[2]: /biddf/ab6498/dev/ctl: cannot execute
dev=
+ cd
+ files=CARE01_DLY_???_date +%Y%m%d
+ echo CARE01_DLY_???_date +%Y%m%d
CARE01_DLY_???_date +%Y%m%d
+ awk {data[FNR] = $0; out=FILENAME "_new"; file[FNR]=out;} END { if ( FNR - 2 == $1) { for ( i=2 ; i < FNR; i++ ) { print data[i] > file[i]} close(file[i])}else { print "error"} } CARE01_DLY_???_date +%Y%m%d
awk: Cannot find or open file CARE01_DLY_???_date.
The source line number is 1.