Skip to content

Instantly share code, notes, and snippets.

@mokkabonna
Created March 16, 2014 14:57
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 mokkabonna/9584448 to your computer and use it in GitHub Desktop.
Save mokkabonna/9584448 to your computer and use it in GitHub Desktop.
rename files
for file in *; do newname="$(cat $file | head -2 | tail -1 | cut -f 3 -d '[' | cut -d '(' -f 1).sublime-snippet"; mv "$file" "$newname"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment