The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
yet another awk field syntax question
.
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
:
yet another awk field syntax question
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
1
(
permalink
)
03-22-2007
prkfriryce
Registered User
Join Date: Nov 2006
Posts: 44
yet another awk field syntax question
I am trying to print the remaing fields and field numbers beginning with a field 'xyz'
Code:
#cat abc test1:test2:xyz:test3:test4:test5 #cat def test1:test2:test3:xyz:test4:test5
desired output is to be able to print NF and any trailing fields separated by':'
test3 3
or
test4 3
or
test5 3
likewise,
test4 2
or
test5 2
placeing a field separator as 'xyz' illiminates using ':' as a second separator or is that possible?
prkfriryce
View Public Profile
Find all posts by prkfriryce
Find prkfriryce's past nominations received
Find prkfriryce's present nominations given