Skip to content

Instantly share code, notes, and snippets.

@veryeasily
Last active December 31, 2015 21:08
Show Gist options
  • Save veryeasily/8044338 to your computer and use it in GitHub Desktop.
Save veryeasily/8044338 to your computer and use it in GitHub Desktop.
STOREFRONT=~/rtr/rtr_ruby_storefront
cd ${STOREFRONT}/public/images
for i in $(ls); do
pushd .
cd ../..
ack-grep -l "\/public\/images\/$i" > tempfile
cat tempfile
for file in $(< tempfile); do
sed "s/\/public\/images\/${i}/\/images\/${i}/g" "$file" > ${file}.bak
done
popd
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment