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

sed Tip - #3

sed  -n  '6!p'  filename

The above command will print all lines in filename except line #6.
The key component that makes this possible is the exclamation point (!).

Try the command on a filename containing the following content:

line 1
line 2
line 3
line 4
line 5
line 6
line 7
line 8
line 9
line 10

 

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