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

What is mtime in find command?

1 Answers  


What does grep v grep do?

0 Answers  


Give the command for finding the current date.

0 Answers  


In Unix file permissions what does the second field denotes?

3 Answers  


What is the functionality of a top command?

0 Answers   Amazon,






Assume the following files are in the working directory prompt> ls -l tasks -rw-r--r-- 1 alex student 1423 Feb 21 14:01 tasks What command can Alex use to give everyone permission to write to the file? What will the ls -l command display if he does so?

10 Answers   Infosys,


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

0 Answers  


Write a command to display a file’s contents in various formats?

0 Answers  


What is unix command?

0 Answers  


What happens when we execute a unix command?

0 Answers  


What is the difference between grep and grep?

0 Answers  


distinguish between interrupts and exceptions?

2 Answers   Infosys, Wipro,


Categories