Last Updated: February 25, 2016
·
397
· sergray

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'