Search and replace in multiple files with pipes
Renamed django-odesk-issue-1 virtual environment to django-odesk-issue-12 and had to fix names in bin files
$ grep -c "django-odesk-issue-1[^2]" bin/* | \
awk -F: '/:[^0]$/{print $1}' | \
xargs -n1 sed -i~ 's/django-odesk-issue-1[^2]/django-odesk-issue-12/g'
Written by Sergey Panfilov
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#