Skip to content

Instantly share code, notes, and snippets.

@drewlesueur
Created July 6, 2011 16:51
Show Gist options
  • Save drewlesueur/1067740 to your computer and use it in GitHub Desktop.
Save drewlesueur/1067740 to your computer and use it in GitHub Desktop.
looping thru a file in bash
#Finding and removing files
for line in `cat invoices`; do find . -name "*$line*" | xargs rm -f ; done
for line in `cat invoices`; do ruby my_ruby_file $line; done
sed -i "s/<\/invoice_id>/A<\/invoice_id>/g" *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment