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
What is the difference between awk and grep?
Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.
What is pipe command in unix?
What are grep patterns?
How does pipe () work?
Who command in unix?
What is sed awk grep?
What is the nmap command?
What is the general format of unix command syntax?
What does the command '$ls | wc –l > file1' do?
Which command should you use to find the remaining disk space in unix server?
How do I delete files from command prompt?
Who invented grep?
How does the system know where one command ends and another begins?
What is the unix command to confirm a remote host is alive or not?