What is the difference between AWK and SED commands? Plz
give example and explain...
Answer Posted / chets
SED (which stands for Stream EDitor) is a simple but
powerful computer program used to apply various
pre-specified textual transformations to a sequential stream
of text data.
It reads input files line by line, edits each line according
to rules specified in its simple language (the sed script),
and then outputs the line.
AWK is a complete pattern scanning and processing language,
it is most commonly used as a Unix command-line filter to
reformat the output of other commands.
For example, to print only the second and sixth fields of
the date command (the month and year) with a space
separating them, at the Unix prompt, you would enter:
date | awk ‘{print $2 ” ” $6}’
| Is This Answer Correct ? | 80 Yes | 12 No |
Post New Answer View All Answers
Explain command to show the space allocation of files?
Can you explain a little bit about command substitution?
What happens when we execute a unix command?
What is in grep command?
Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?
What is ctrl d?
What is the behavioural difference between cmp and diff commands?
What is the use of cut command in unix?
What is grep short for?
What does grep v grep do?
What is the comma to show the space allocation of files?
Name the various commands that are used for the user information in unix.
What is the functionality of a top command?
What is the use of the command 'ls -x chapter[1-5]' ?
Name the unix command to find how many days the server has been up.