What command is used to replace the existing string with
some other?

Answer Posted / amit kumar

sed 's/existing_word/new_word/g' file1.txt.It replaces the
all the existing word with new word wherever it occurs in
file1.g stands for global.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the terms ‘system calls’ and ‘library functions’ with respect to unix commands?

641


What does touch command do in unix?

729


What does awk stand for?

608


What is a command and examples?

583


What does 'mkdir' command do in UNIX?

660






What is time_t?

586


Which command will print your home directory on screen?

546


How do I find previous commands in unix?

592


What is the use of find command in unix?

581


Why is awk called awk?

577


What is the unix command to confirm a remote host is alive or not?

579


What are the commands in UNIX to list the files in a Directory?

618


Write a command that will display files in the current directory, in a colored, long format.

683


How do I search for a file in unix command?

546


What is the general format of unix command syntax?

693