Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- home="$PWD"
- find * -maxdepth 1 -name "*" -type d |\
- while read dir;
- do
- cd "$dir"
- for file in *
- do
- mv "$file" "$dir-$file"
- done
- cd "$home"
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement