INSTALLATION DOCUMENTS BY RAVI

Thursday, May 11, 2017

sed command to search replace a word in a file in linux

Command to search and replace a word in a file:

sed -i 's/original word/word to replace/g' filename

Command to search and replace a word in all of the files in a directory:


grep -rl 'original word' path_of_the_directory | xargs sed -i 's/original word/word to replace/g'

No comments:

Post a Comment

SQL query to find whether OdiSendMail is configured or not ODI 12c

In the SQL developer connect to the ODI work repository user (Ex: DEV_ODI_REPO) and run the below query. select SCEN_NAME,TASK_NAME3,DE...