What is use of sed command?
Answers were Sorted based on User's Feedback
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 |
Answer / naren
sed -e 's/oldstuff/newstuff/g' inputFileName >
outputFileName
Is This Answer Correct ? | 10 Yes | 0 No |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Write a grep (or grep) command that selects the lines from a file that have exactly three characters.
Explain how to use grep command to list find the records of a file containing 10 different strings?
what do you understand by 'building block primitive'?
What is grep short for?
How does pipe () work?
How do you find which version and name of unix you are using at the command prompt?
can we use cat command as an editor ..???
Are you in or at the office?
what is the meaning of this command rm -rf / what will it do ?
How to find $ai_serual resolved path by using unix
What does the command '$ls | wc –l > file1' do?
Which unix command to make a new directory?