The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 04-21-2009
pinnacle pinnacle is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 182
Cat command help

I want to concatenate 100 files to one file and append file name in each record to find out which file it came from

Code:
for a in $(<shal_group)
do
cat $a >> bigoutput.group
The above code put all files in one file but i want file name appended to each file

Record should be like this
file1| data ...
fiel2| data....

Appreciate your help