The UNIX and Linux Forums
Forum Home
Linux and Unix Man Pages
Search Forums
Search Community Posts
Today's Posts
Quick Links
Man Pages
RedHat Commands
OpenSolaris Commands
Linux Commands
SunOS Commands
FreeBSD Commands
All UNIX Man Pages
All Linux Man Pages
Full Man Repository
Login or Register to Ask a Question and Join Our Community
Search Forums
Show Threads .
Show Posts
Tag Search
Advanced Search
Quick Links
Contact Us
Forum Rules
Today's Posts
FAQ
Pictures & Albums
All Albums
Miscellaneous
What is My IP
Whois
Mark Forums Read
Shell Programming and Scripting
[help]
Tags
shell scripts
Login to Discuss or Reply to this Discussion in Our Community
Thread Tools
Search this Thread
Top Forums
Shell Programming and Scripting
[help]
#
1
06-18-2008
vikashtulsiyan
Registered User
42,
0
Join Date: Dec 2007
Last Activity: 26 November 2008, 6:49 AM EST
Posts: 42
Thanks Given: 0
Thanked 0 Times in 0 Posts
[help]
i want to capture only location details, (abc & def in this example) from a file.
The beginning of file may contain anything. The the column heading(Location Vendor ....)
File:
# there can be anything here
AVAILABLE OUTPUT:
Location Vendor Product Rev Serial #
abc KKKK 123456 0401 0347
def GGGG 3367N 36G 7N05LMF
Can someone help me write a script to capture location details only
vikashtulsiyan
View Public Profile for vikashtulsiyan
Find all posts by vikashtulsiyan
#
2
06-18-2008
robotronic
Registered User
370,
0
Join Date: Apr 2002
Last Activity: 20 December 2009, 10:56 AM EST
Location: Italy
Posts: 370
Thanks Given: 0
Thanked 0 Times in 0 Posts
You need to substitute "4" with the actual number of lines that composes the header you don't want in your output:
Code
:
awk 'NR>4 { print $1 }' input_file.txt
robotronic
View Public Profile for robotronic
Find all posts by robotronic
Login or Register to Ask a Question
Previous Thread
|
Next Thread
Login or Register to Ask a Question
Member Badges and Information Modal
×