Visit Our UNIX and Linux User Community


Thread Tools Search this Thread
Top Forums Shell Programming and Scripting [help]
# 1  
Old 06-18-2008

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 ....)

# there can be anything here

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
# 2  
Old 06-18-2008
You need to substitute "4" with the actual number of lines that composes the header you don't want in your output:

awk 'NR>4 { print $1 }' input_file.txt

Previous Thread | Next Thread

Featured Tech Videos