Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !/bin/bash
- shopt -s nullglob for NAME in * ;
- do TRS=`echo $NAME | sed "y/-_ /.../"`
- TRS=${TRS//-/.}; TRS=${TRS//_/.} TRS=${TRS// /.};
- if [[ `file -b "$NAME"` == directory ]];
- then mv -v "$NAME" "$TRS" cd "$TRS" "$0" cd .. else mv -v "$NAME" "$TRS" fi done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement