How to batch files in Kornshell?

January 6, 2012 at 11:08:00
Specs: Windows XP/Virtual Unix
Files will be sent Tues-Sat to be run on Mon. The filenames will be ABCDEFG_01062012.
I need to concatenate the daily files into a single file. Any help is appreciated

See More: How to batch files in Kornshell?

Report •


#1
January 6, 2012 at 12:08:03
Do you mean something like:

#!/bin/ksh

# cd <to_your_directory>
for i in ABCDEFG_01062012.*
do
   cat $i >> newfile.txt
done


Report •

#2
January 6, 2012 at 12:08:03
<deleted extra post>

Report •

#3
January 6, 2012 at 13:12:26
Something on those lines.
But I would need to check in folder A if the file has been dropped; Then concatenate it to the previous days file in location B or if this is the first file received than move it to another folder B

Report •

Related Solutions

#4
January 6, 2012 at 13:48:12
Your requirements are not very clear. Do all the files have a date string that changes? Do the files have an extension?

Maybe some file name examples would help?


Report •


Ask Question