accueil
services
portfolio
contact
labo
blog
espace client
snippets : recursive search and replace in linux with find and sed
Shell
:
recursive search and replace in linux with find and sed
replace all occurences of oldtext with newtext in any .py file in /home/juju/project directory
#!/bin/sh
find
/
home
/
juju
/
project
-
iname
'*.py'
-
exec
sed
-
i
's/oldtext/newtext/g'
{} \
tags :
system
,
bash
all tags :
python
,
system
,
vlc
,
video
,
apache
,
proxy
,
linux
,
django
,
MySQL
,
.NET
,
XML
,
XSL
,
regexp
,
bat
,
windows
,
bash
,
git
back to snippets home