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


Please Help Members By Posting Answers For Below Questions

Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.

630


What does pipe () return?

604


Describe the usage and functionality of the command rm –r * in unix?

833


Which unix command to make a new directory?

596


What is command statement?

549






Explain how to use grep command to list find the records of a file containing 10 different strings?

605


How do I search for text in vi?

597


Enlist some filename manipulation commands in unix.

560


Explain the steps that a shell follows while processing a command.

687


What does the metacharacter mean?

618


Which command should you use to find the remaining disk space in unix server?

720


Is it inbetween or in between?

592


What do chmod, chown, chgrp commands do?

646


Explain command to view process running?

624


why metadb requires a seperate slice to create Solaris volume manager

2562