Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

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 :: bash change to script directory 
Shell :: yarn frozen lockfile 
Shell :: show detail all changes in a git log 
Shell :: nmcli connection status 
Shell :: install package from conda forge not found in conda 
Shell :: linux setup pass gpg key 
Shell :: how to install apache server in ubuntu 
Shell :: almofire pod install 
Shell :: tsc version showing 1.0.3.0 
Shell :: microsoft teams reopen main window 
Shell :: powershell find in history 
Shell :: get jq command 
Shell :: how to check bash runs with sudo 
Shell :: gpg-decryption 
Shell :: openssl generate certificate 
Shell :: installing firefox on debian 
Shell :: gdown Access denied with the following error 
Shell :: gdal 0 1 raster to binary 
Shell :: git discard untracked 
Shell :: convert biom to tsv 
Shell :: kill a process on ubuntu 
Shell :: setxkbmap toggle 
Shell :: telegram on arch linux 
Shell :: ethers install 
Shell :: ubuntu desktop file folder 
Shell :: datetime calculation in shell 
Shell :: push a local branch 
Shell :: pacman 404 
Shell :: brew graphviz 
Shell :: npm steps 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =