I have lot of files in a folder where each file name includes the date of generation, then I would like to merge
all the files for each date in a complete file.
dsd_121104.txt " all files for day 121104 concatenated "
dsd_121105.txt " all files for day 121105 concatenated "
dsd_121106.txt " all files for day 121106 concatenated "
Also, Please how to make a script ,, to make a copy for all the files from one date to a new folder,
I mean to create a new folders.. example folder dsd_121104..
and copy files for day 121104. and the same for the rest of days...
new folders
dsd_121104 "inside all files for day 121104"
dsd_121105 "inside all files for day 121105"
dsd_121106 "inside all files for day 121106"
If you're running cat 9 times to read 9 files, you don't know what cat's for. You also don't need ls's help to use *. And don't need to use a temp file.
I notice that the concatenated file is saved in the created folder.. The main point is to make a copy of all the files for the same date in a new folder... And the concatenated file should be saved in the original folder where are all the files.. Thanks for your help
---------- Post updated 11-23-12 at 05:46 AM ---------- Previous update was 11-22-12 at 01:51 PM ----------
Thanks guys
I have done a little change in your script to like that,, and now is working as I want. thanks again.