Difference between revisions of "Bash oneliners"

From UVOO Tech Wiki
Jump to navigation Jump to search
(Created page with "``` grep -rl oldtext . | xargs sed -i 's/oldtext/newtext/g' ```")
 
Line 1: Line 1:
 
```
 
```
 
grep -rl oldtext . | xargs sed -i 's/oldtext/newtext/g'
 
grep -rl oldtext . | xargs sed -i 's/oldtext/newtext/g'
 +
```
 +
 +
```
 +
find /home/www \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i 's/subdomainA\.example\.com/subdomainB.example.com/g'
 
```
 
```

Revision as of 23:49, 26 August 2021

grep -rl oldtext . | xargs sed -i 's/oldtext/newtext/g'
find /home/www \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i 's/subdomainA\.example\.com/subdomainB.example.com/g'