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
Which command is used to create a directory?
Explain the terms ‘system calls’ and ‘library functions’ with respect to unix commands?
Name the unix command to find how many days the server has been up.
What is the function of grep command in unix?
Write a command that will display files in the current directory, in a colored, long format.
What is used to type command?
What is awk command used for?
What is the difference between grep and grep?
What is the use of the tee command?
What is .sh file?
Which command is used to kill the last background job?
How do I use grep to search for a file?
What does sed command do in unix?
What is $0 bash?
Explain command to view process running?