Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sed stops to output with -n option 1

Status
Not open for further replies.

vakimova

Technical User
Dec 24, 2005
21
RU
dear all,
the command
>sed s/m/x/g
works on my box OK. But adding '-n'
>sed -n s/m/x/
makes it to output blank lines even after those containing "m's"
How to understand this deviation from a tutorial predictions?

yours`
serguey
 
Hi

With -n [tt]sed[/tt] produce no default output. If you want it to write something, you must tell it, for example with the [tt]p[/tt] ( print ) command.

Feherke.
 
dear Feherke,

thank you for the info,
maybe I've knocked on a wrong tutorial.

yours`
serguey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top