What is use of sed command?

Answer Posted / bhaskar

Usage: sed [OPTION]... {script-only-if-no-other-script}
[input-file]...

-n, --quiet, --silent
suppress automatic printing of pattern space
-e script, --expression=script
add the script to the commands to be executed
-f script-file, --file=script-file
add the contents of script-file to the
commands to be executed
-i[SUFFIX], --in-place[=SUFFIX]
edit files in place (makes backup if
extension supplied)
-c, --copy
use copy instead of rename when shuffling
files in -i mode
(avoids change of input file ownership)
-l N, --line-length=N
specify the desired line-wrap length for
the `l' command
--posix
disable all GNU extensions.
-r, --regexp-extended
use extended regular expressions in the script.
-s, --separate
consider files as separate rather than as a
single continuous
long stream.
-u, --unbuffered
load minimal amounts of data from the input
files and flush
the output buffers more often
--help display this help and exit
--version output version information and exit

If no -e, --expression, -f, or --file option is given, then
the first
non-option argument is taken as the sed script to interpret.
All
remaining arguments are names of input files; if no input
files are
specified, then the standard input is read.

E-mail bug reports to: bonzini@gnu.org .
Be sure to include the word ``sed'' somewhere in the
``Subject:'' field.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When i run a programm of orphan process. Instead of getting child's parent (ppid)=1 ..i get 1400 and it varies as per system. How can i findthe right soluion??? My pgm: #include # include int main() { int pid; pid=fork(); if(pid < 0) {exit(-1);} else if(pid==0) { printf("Child Process is Sleeping ..."); sleep(10); printf("Orphan Child's Parent ID : %u ",getppid()); } else { printf("Parent Process Completed ... %u ",getpid()); exit(0); } return 0; } Output:

1758


What difference between cmp and diff commands?

720


Which unix command to make a new directory?

587


What are the unix commands?

555


Differentiate cat command from more command.

574






Which command is used to restrict incoming messages?

592


What is the search command in unix?

597


Can you enlist some commonly used network commands?

597


Is grep faster than awk?

557


What are bash commands?

588


How do I delete files from command prompt?

549


What is the command to view process running?

572


How can we use grep command in unix?

610


What is awk good for?

582


What is updatedb?

580