Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

Linux command line search and replace string


> grep -rl "old string" . | xargs sed -i 's/old string/new string/g'

Comment

linux replace string in all files

sed -i 's/old-text/new-text/g' input.txt
Comment

Linux command line search and replace string in all files

 String Find and replace (folders/sub folders)
> grep -rl "old string" . | xargs sed -i 's/old string/new string/g'

 URL Find and replace  (folders/sub folders) 
> grep -rl "www.google.com" . | xargs sed -i 's/www.google.com/www.yahoo.com/g'
Comment

PREVIOUS NEXT
Code Example
Shell :: how to find all the dir in current working directory in linux 
Shell :: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-idlotqqi/cryptography/ 
Shell :: arch linxu 
Shell :: git check if stash exists 
Shell :: vlc ubuntu 
Shell :: install postman in ubuntu 20.04 
Shell :: ubuntu install lamp 
Shell :: curl install docker-compose linux 
Shell :: powershell select unique 
Shell :: get path composer 
Shell :: how to install nginx on docker 
Shell :: root folders via gui ubuntu 
Shell :: interesting bash scripts 
Shell :: htpasswd add user 
Shell :: bash if larger than 
Shell :: linux change permission 
Shell :: Creating a new Laravel application 
Shell :: wordpress mit ssh installieren 
Shell :: edit path linux 
Shell :: change crontab editor 
Shell :: git commit single file 
Shell :: class sorting in tailwindcss 
Shell :: change directory on WSL 
Shell :: install faiss in colab 
Shell :: Command to install tailwind plugin in vue 
Shell :: tempfile.temporarydirectory() 
Shell :: docker getting-started 
Shell :: uninstall npm package 
Shell :: curl upload to artifactory with basic auth 
Shell :: revert git add 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =