How to find and replace the below command?

Answer Posted / pavithra

Using sed command:

sed 's/searchword/replaceword/g' filename --[It finds the
word in file and replaces and displays in the command line]

sed -i '/s/searchword/replaceword/g' filename -- [It edits
the file, finds and replaces the word and saves it and next
time when u open the file it displays the file with replaced
word]

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is command statement?

776


What's a command word?

791


What are some command words?

795


What is {} in find command?

767


Which command will print your home directory on screen?

775






Who command in unix operating system?

850


What is the function of grep command in unix?

775


What is rmdir command?

780


What does awk stand for?

786


What is the command to view process running?

784


What is the difference between cat and more command?

879


How do I use grep to search for a file?

777


How many unix commands are there?

805


What does touch command do in unix?

960


Which unix command lists files/folders in alphabetical order?

1043