Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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 – JorgeeFG 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .