Skip to content

Instantly share code, notes, and snippets.

@sheldonh
Created March 18, 2009 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sheldonh/81064 to your computer and use it in GitHub Desktop.
Save sheldonh/81064 to your computer and use it in GitHub Desktop.
# Iterate through all directories in /usr/www except zendfram.
# For each one, find all its files and pass each one in turn
# to a sed script that replaces the path to the zend framework.
for dir in `ls /usr/www/*`; do
if [ "$dir" = "zendfram" ]; then
continue
fi
find $dir -type f -print0 | xargs -0 -n 1 \
sed -i.bak -e 's,/usr/www/users/zendfram,/usr/local/zendfram,g'
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment