What is the difference between AWK and SED commands? Plz
give example and explain...
Answer Posted / sreenivas
sed reads from standard input and/or file(s), applies specified
changes which are typically mostly editing changes, and
writes to
standard output. It is relatively similar to the text editor
ed(1),
except in the case of sed it doesn't alter its input
file(s)*, but
writes the data to standard output, and sed also has some
commands
which ed does not have (and in most cases wouldn't be
suitable for or
make sense for ed). sed's commands are mostly limited to editing
type commands.
awk is sort of like an interpreted somewhat C-like language with
added built-in functionality for dealing with strings and
patterns.
Though not a fully general purpose programming language, awk
is much
closer to such than sed.
| Is This Answer Correct ? | 22 Yes | 9 No |
Post New Answer View All Answers
Describe the zip/unzip command using gzip.
Why is it called a shebang?
How does the system know where one command ends and another begins?
What do chgrp command do?
What is the use of cut command in unix?
What is ctrl d?
What is pipe command in unix?
Explain ‘library functions’ with respect to unix commands?
What are reported commands?
Why is shebang used?
Why is awk called awk?
Can you explain a little bit about command substitution?
What is s and g in sed command?
What does grep v do?
Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.