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
Who invented grep?
What are some command words?
What is the difference between awk and grep?
What are filter commands in unix?
Write a command to display a file’s contents in various formats?
What does grep v grep do?
What command is used to check the current users?
What is the functionality of a top command?
How do you grep a case insensitive?
How does the system know where one command ends and another begins?
What is the use of sed command in unix?
What do chgrp command do?
What is the use of tee command?
How do I use grep to find a file?
What does find command return in unix?