cancel
Showing results for 
Search instead for 
Did you mean: 
Trevor
Starfighter Starfighter
Starfighter
  • 462 Views

awk Command Equivalent

The following command will print the 27th line of 
the file named "people":

sed  -n  {27p}  people

 

Is there an equivalent awk command that will 
accomplish the same?  If so, what is the syntax?

 

 

Trevor "Red Hat Evangelist" Chandler
Labels (3)
0 Kudos
2 Replies
TM
Flight Engineer Flight Engineer
Flight Engineer
  • 443 Views

Hi,

awk ' NR == 27 ' people

will do.

Regards,

Tshimanga

Trevor
Starfighter Starfighter
Starfighter
  • 436 Views

Bingo!!!

That command does the trick!!!

Trevor "Red Hat Evangelist" Chandler
0 Kudos
Join the discussion
You must log in to join this conversation.