Stream Editor - Standard Options

SED supports the following standard options:
-n::Default printing of pattern buffer.
-e:Next argument is an editing command.
-f:Next argument is a file containing editing commands.


Let us create a text file lfc.txt.

\\ The following SED command does not show any output:
$ sed -n '' lfc.txt 
\\By using this option, we can specify multiple commands.This will print each line twice.
$ sed -e '' -e 'p' lfc.txt
\\This will specify print command through file.
$ echo "p" > commands 
$ sed -n -f commands lfc.txt

Visit :


* You must be logged in to add comment.