Thanks Agama. I agree with you. (Made the changes you suggested).
Now, i have a different issue. In the test.txt file, I have one more variable named BUS_DATE (& it comes first in the file).
$cat test.txt
BUS_DATE=20120609
SUB_DATE=20120608,20120607,20120606,20120605
Looks like it is taking the BUS_DATE & then goes to the SUB_DATE.
Pls find the error msg below,
Quote:
+ for x in '`sed '\''s/^SUB_DATE=//;s/,/\n/g'\'' path/test.txt`'
+ mv /path/filename.BUS_DATE=20120314.dat.gz /destination/ mv: cannot stat `/source/filename.BUS_DATE=20120314.dat': No such file or directory
+ for x in '`sed '\''s/^SUB_DATE=//;s/,/\n/g'\'' path/test.txt`'
+ mv /source/filename.20120608.dat /destination/
I dont need to pass the BUS_DATE. Any thoughts.
Thanks much
Freddie