Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My Sed's man outputs this:

Zero- or One- address commands
   =      Print the current line number.

   a \

   text   Append text, which has each embedded newline preceded by a backslash.

   i \

   text   Insert text, which has each embedded newline preceded by a backslash.

   q [exit-code]

I was trying to figure out how to do in-place edit, and seems that the switch is -i but I couldn't see it before because my man doesn't have its description, any clue of why?

Thanks!

share|improve this question
    
Just for your information, you can search in man files by typing slash / and the string you want to search. For example /-i –  terdon Jan 22 '13 at 17:34
add comment

1 Answer 1

up vote 1 down vote accepted

That's because you're seeing the wrong part of the man page. Try the description section:

-i[SUFFIX], --in-place[=SUFFIX]

edit files in place (makes backup if extension supplied)

EDIT: This assumes GNU sed.

share|improve this answer
    
Lol, forgivable because i'm newbie :P –  Jorge Jan 22 '13 at 17:15
    
@jorge, if this answer helped you, please accept it by clicking on the checkmark to the left. –  terdon Jan 22 '13 at 17:32
    
Note that this applies to GNU sed. The BSD sed requires you to put a space after -i and the backup extension. –  slhck Jan 22 '13 at 18:01
    
And it doesn't seem to be supported by POSIX at all. –  Aluísio A. S. G. Jan 22 '13 at 18:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.