Skip to content

Instantly share code, notes, and snippets.

@gdevanla
Last active December 16, 2015 13:48
Show Gist options
  • Save gdevanla/5443840 to your computer and use it in GitHub Desktop.
Save gdevanla/5443840 to your computer and use it in GitHub Desktop.
Rename files with substring found in original file names.
for i in `ls`; do x=`echo $i | sed "s/doku.php.*s:uc\([1-9]*\).*/uc\1/g"`; mv $i $x.txt ; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment