Below is the sed command I used inside the bash script to do this. Instead of using a backslash as the delimiter, I used #, you can use another non-character as well.
Environments tested
CentOS release 6.7
To replace "https://localhost:8080" with "http://dev.cherryshoetech.com" in the cherryshoetech.js file:
- When you don't need to use shell variables, the following works:
- When you need to use shell variables, the following works. Notice the double quotes are used for interpolation:
Also used the following to grep for specific process "gulp" and kill in the same line. This article was of great help.
kill $(ps aux | grep '[g]ulp' | awk '{print $2}')
No comments:
Post a Comment
I appreciate your time in leaving a comment!