What is use of sed command?

Answers were Sorted based on User's Feedback



What is use of sed command?..

Answer / surya

sed is a stream editor for editing files from a script or from
the command line

Is This Answer Correct ?    34 Yes 0 No

What is use of sed command?..

Answer / naren

sed -e 's/oldstuff/newstuff/g' inputFileName >
outputFileName

Is This Answer Correct ?    10 Yes 0 No

What is use of sed command?..

Answer / vandanaverma_2

sed reads the standard input into the pattern space,
performs a sequence of editing commands on the pattern
space, then writes the pattern space to STDOUT.

Is This Answer Correct ?    14 Yes 5 No

What is use of sed command?..

Answer / varakumar

The sed utility is a stream editor that reads one or more
text files, makes editing changes according to a
script of
editing commands, and writes the results to standard
output.
The script is obtained from either the script
operand
string, or a combination of the option-arguments from
the -e
script and -f script_file options.

The sed utility is a text editor. It cannot edit
binary
files or files containing ASCII NUL (\0) characters
or very
long lines.

Is This Answer Correct ?    9 Yes 0 No

What is use of sed command?..

Answer / sneha

sed is stream editor.It is use to change one string of text
to another text.

Is This Answer Correct ?    7 Yes 0 No

What is use of sed command?..

Answer / sumitabha das

sed is a multipurpose tool which combines the work of
several filters.

sed uses instructions to act on text.
AN instruction combines an address for selecting lines with
an action to be taken on then , as shown by the syntax

sed options 'address action' file(s)

Is This Answer Correct ?    7 Yes 2 No

What is use of sed command?..

Answer / 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

What is use of sed command?..

Answer / vijay

its same like Find and replace strings

Is This Answer Correct ?    8 Yes 4 No

What is use of sed command?..

Answer / kumar akhila

sed reads the standard input into the pattern space,
performs a sequence of editing commands on the pattern
space, then writes the pattern space to STDOUT.

Is This Answer Correct ?    7 Yes 3 No

What is use of sed command?..

Answer / sujit

sed is use to replace a character string with a defferent
string

syntax of "sed"
sed s/oldstring/newstring/filename

example
sed s/sujit/ajit/abc.old>abc

it means string sujit change into ajit which placed in file
abc.old

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More Unix Commands Interview Questions

Who command in unix?

0 Answers  


Which command is used to kill the last background job?

0 Answers  


What are filter commands in unix?

0 Answers  


Explain iostat, vmstat and netstat.

3 Answers   CTS, Wipro,


what these two commands prints "echo test","cat test"?

6 Answers   TCS, Wipro,






Enlist some filename manipulation commands in unix.

0 Answers  


in a growing log file how will you see the 1st 99 lines?

7 Answers  


what does a process mean?

5 Answers   Infosys,


why unix operating system provides more security than other operating systems?

4 Answers  


what is mount ,tell me about mount ,how can u use in real time project??

12 Answers   Symphony,


Is ‘du’ a command? If so, what is its use?

0 Answers  


What is the pipe command?

0 Answers  


Categories