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 -->
  #3 (permalink)  
Old 04-21-2009
pinnacle pinnacle is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 182
Quote:
Originally Posted by jim mcnamara View Post
Code:
for i in $(< shal_group)
do
    awk '{print FILENAME, "|", $0   }' $i
done > outputfile
Thanks jim mcnamara it works.
I need a minor change in this.

Record looks like this
/user/tmp/server1_etc_group| data ...
/user/tmp/server2_etc_group| data....

I want data like this
server1|data....
server2|data

Thank you sir