Skip to content

Instantly share code, notes, and snippets.

@nickmancol
Created January 20, 2017 19:12
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 nickmancol/f50e998f6e6aa68a361a10e60380fc70 to your computer and use it in GitHub Desktop.
Save nickmancol/f50e998f6e6aa68a361a10e60380fc70 to your computer and use it in GitHub Desktop.
Bash script to rename files listed in a master file
#!/bin/sh
CURRENT=1
FILENAME=selectivo.xhtml.html
while [ true ]; do
if test -f $FILENAME
then
mv $FILENAME $CURRENT.html
CURRENT=`expr $CURRENT + 1`
fi
sleep 1
#echo "Reintentando renombrar archivo $FILENAME"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment