Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- for i in `ls -d a*`
- do
- dirlet=`echo $i|cut -c-1`
- if [ ! -d ../Pics2/${dirlet,,} ]
- then
- echo Creating ${dirlet,,}
- mkdir ../Pics2/${dirlet,,}
- fi
- echo Moving $i to ../Pics2/${dirlet,,}/
- mv $i ../Pics2/${dirlet,,}/
- done;
Advertisement
Add Comment
Please, Sign In to add comment