Skip to content

Instantly share code, notes, and snippets.

@clauswitt
Created January 22, 2012 21:04
Show Gist options
  • Select an option

  • Save clauswitt/1658777 to your computer and use it in GitHub Desktop.

Select an option

Save clauswitt/1658777 to your computer and use it in GitHub Desktop.
Remove prefix with 5 digits and an underscore from 1800+ filenames
#! /bin/bash
for i in *
do
mv $i `echo $i | sed 's/[0-9]\{5\}_\(.*\)/\1/'`
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment