Skip to content

Instantly share code, notes, and snippets.

@sideshowcoder
Created July 25, 2011 14:14
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 sideshowcoder/1104215 to your computer and use it in GitHub Desktop.
Save sideshowcoder/1104215 to your computer and use it in GitHub Desktop.
_1 replace string in filename for all files in folder
#!/bin/bash
FILES=$(ls *.tif)
for f in $FILES; do
NN=`echo $f | sed -e"s/\_1\./\_gfp\./"`
mv $f $NN
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment