Skip to content

Instantly share code, notes, and snippets.

@wuseman
Created February 7, 2019 18:56
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Move all folders and sort them from a-z
#!/bin/bash
# Author: wuseman
for i in *; do I=`echo $i|cut -c 1|tr a-z A-Z`; if [ ! -d "$I" ]; then mkdir "$I"; fi; mv "$i" "$I"/"$i"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment