NickName:rpav Ask DateTime:2017-11-30T13:22:56 replace a line in files present in different folders shell script I have a common line in different files present in different folders. how can i replace that line with some other line using shell script sed command in all the files of the folders ? Eg: t="/home/file.txt" present in one of the file in a folder same line is present in different file of differnt folder I have to replace it with t="/desk/file1.txt" . so where can i execute the sed command whether outside the folder ? Copyright Notice:Content Author:「rpav」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.Link to original article:https://stackoverflow.com/questions/47566414/replace-a-line-in-files-present-in-different-folders-shell-script Answers