purpose of -n
3 posters
Re: purpose of -n
The -n option tells sed to print only those lines matching the pattern.
eg
eg
- Code:
sed -n '/1001/p' sample.txt
Re: purpose of -n
hey i found that
-n means "no automatic output"
no output is displayed unless specified to be printed using /p
-n means "no automatic output"
no output is displayed unless specified to be printed using /p
jeeva- Posts : 50
Points : 93
Join date : 2010-03-04
Re: purpose of -n
-when -n is used the output is not displayed...
i.e,
the modifications are not displayed...
to view the modifications ,when -n is used ,we have use p at the end of the reg exp
i.e,
the modifications are not displayed...
to view the modifications ,when -n is used ,we have use p at the end of the reg exp
akalya- Posts : 70
Points : 86
Join date : 2010-03-04
Permissions in this forum:
You cannot reply to topics in this forum
|
|