The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
reading file
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Portal
Register
Rules & FAQ
Contribute
Members List
Arcade
Search
Today's Posts
Mark Forums Read
Thread
:
reading file
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
10
(
permalink
)
12-10-2004
bhargav
Registered User
Join Date: Sep 2004
Location: USA
Posts: 511
generic code this time ....
awk -F":" '{
for (i=1; i<= NF; i++)
{
if (i%2 == 0) { printf("%s\t", $i) }
if ( i == 1 ) { printf ("\n") }
}
}' testfile
bhargav
View Public Profile
Find all posts by bhargav