Unix - What is use of sed command?

What is use of sed command?

Sed command in UNIX is commonly used for processing of files. Sed stands for Stream Editor which parses text files and used for making textual transformations to a file. The command specified to Sed, is applied on the file line by line.

Example:

To replace all matching occurrences of some text to another.
sed -e 's/olddata/newdata/g' inputFileName > outputFileName

Here, g is global which replaces ALL occurrences.

What is use of sed command?

Sed command reads from a standard input and places it into the pattern space. It performs various editing commands on that pattern space in a sequential manner. Later the pattern space is written onto the STDOUT.
Unix - What is 'inode'?
What is 'inode'? - A file in UNIX is given a unique number.........
Unix - What are links and symbolic links in UNIX file system?
What are links and symbolic links in UNIX file system? - A link is a pointer or reference to another file.........
Unix - Explain fork() system call.
Explain fork() system call - fork() system call is used to create processes........
Post your comment