Sed Command
Sed Command
Sed Command
EXAMPLES
SED SYNTAX
sed [options] <address
actionlist> < filelist>
Options may be
E,f,n
Dilip : 562
Harish : 621
Lalitha : 245
Prakash : 120
Rohini : 364
Uday : 864
(ctrl+d save and exit)
Now, from the above file (emp_code)
$ sed - e 1d -e 2q emp_code
Harish : 621
On execution of the above command,
First line is deleted using the
command 1d
Awk-command
awk - an advanced filter.
created by Aho, Weinberger & Kernighan
awk is not just a command,
its a general purpose programming language that is designed for
processing text-based data, either in files or data streams.
The general syntax of awk command is
BEGIN{.}
PROGRAME
STATEMENTS
DESIGN