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 |
What is pid?
what is virtual machine?
How to create hardlinks and softlinks on files?
Which unix command lists files/folders in alphabetical order?
what is difference between unix and linux?
What is the function of grep command in unix?
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<stdlib.h> # include <stdio.h> 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:
Why is it called grep?
What are awk commands?
How do you grep recursively?
Give Command that will move a single file called "unix.txt"
How to rename files and folders?