Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Place this file (rename.sh) in a different directory
- # to the one with your files to be renamed.
- # Then run this using relative indexing.
- # e.g. If rename.sh is in the parent directory of your files
- # then you run ../rename.sh
- COUNTER=1
- EXT="jpg"
- for l in $(ls)
- do
- mv $l "$COUNTER.$EXT"
- ((COUNTER = COUNTER + 1))
- done
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement