Thanks for quick reply Shell_Life.
Quote:
Originally Posted by
Shell_Life
Ksrams,
Please give us more information, such as sample of file name with the
timestamp and the expected output.
Here is the info.
Input file(s) located under directory /input and file names are:
1) input1_20070723_171556.txt
2) input2_20070723_171556.txt
3) input3_20070723-171556.txt
input1_20070723_171556.txt sample data:
HEADERRECORD 20070723 DESC
aaa 111 222 333 bbb
bbb 222 111 444 ccc
ccc 333 444 111 ddd
TRAILERRECORD 3
I want the do the following process in one script..
a) First thing is i want to copy all the files into /ouput directory
b) rename the files under /out directory to
1) rename input1_20070723_171557.txt file to input1.txt and also remove HEADERRECORD 20070723 DESC(header record i.e always first line) and TRAILERRECORD 3(Detail record i.e always last line in file) from input1.txt
input1.txt file data should be:
aaa 111 222 333 bbb
bbb 222 111 444 ccc
ccc 333 444 111 ddd
2) rename input2_20070723_171557.txt to input2.txt and also remove first and last lines from input2.txt
3) rename input3_20070723_171556.txt to input3.txt and also remove first and last lines from input3.txt
I hope this is much better compare to my previous post.
I would appreciate if you guide me on this..
Thanks in advance..