Need to get all flat files into one flat file
Moderators: chulett, rschirm, roy
Need to get all flat files into one flat file
I have a requirement that I need to get all the output flat files into one flat file separated with file name. Can any one help me on this how to get this done.
So... you need to generate it like that from the start or can you generate them separately and then combine them afterwards? The latter is just 'concatenation' in a loop and something you could script. The former... would have to ponder that.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
can do it in sequential file stage
In sequential file stage options filter = awk ' BEGIN { print "#pHEADER#"; } { print; } END { print "#pTRAILER#"; } '
Thanks
Thanks
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Code: Select all
for fileName in `ls -1`
do
echo $fileName >> yourFileName
cat $fileName >> yourFileName
done