Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2019-08-14 10:44:10
Size: 174
Editor: PieterSmit
Comment:
Revision 4 as of 2019-12-14 12:25:47
Size: 458
Editor: PieterSmit
Comment: add Xargs
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Describe Linux/FindGrepAwkSed here. ## page was renamed from Linux/FindGrepAwkSed
Describe Linux/FindGrepAwkSedXargs here.
Line 5: Line 6:
 * [[regex]] only part of grep match returned

== Search dir for files containing string and replace all of them ==
{{{
##e.g. search for tentant -> tenant
grep -irlZ 'tentant' ./ | xargs -0 sed -i 's/tentant/tenant/g'
}}}

Describe Linux/FindGrepAwkSedXargs here.

Find files containing something in Linux

Search dir for files containing string and replace all of them

##e.g. search for tentant -> tenant
grep -irlZ 'tentant' ./ |  xargs -0  sed -i 's/tentant/tenant/g'


CategoryLinux

Linux/FindGrepAwkSedXargs (last edited 2024-01-24 20:48:46 by PieterSmit)