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

Any Command Equivalent

The following command will display lines
7 thru 18 of the file named "people".  

sed  -n  '{7,18p}'  people

 

Is there any other command (or commands)
that will accomplish the same?  If so, how
about sharing the syntax with me.

 

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

Hi,

awk ' NR >= 7 && NR <= 18 ' people

will do.

Regards,

Tshimanga

Trevor
Starfighter Starfighter
Starfighter
  • 195 Views

I tried it, and it works!

I like it!  I like it a lot!!!

 

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