The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
passing awk variable to the shell script
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
passing awk variable to the shell script
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
07-21-2004
zazzybob
Registered Geek
Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
An awk one liner should do the trick for the whole set of data
Code:
awk -F'|' '{printf( "%s;%s;%s\n", $2, $3, $4 ) >> "outfile" }' infile
Cheers
ZB
zazzybob
View Public Profile
Visit zazzybob's homepage!
Find all posts by zazzybob
Find zazzybob's past nominations received
Find zazzybob's present nominations given