October 4, 2020

rename all jpg with random names

#!/bin/bash    
for img in *.jpg; do
newname=$(head /dev/urandom | tr -dc a-z0-9 | head -c 8)
mv "$img" "$newname".jpg
done

No comments:

Post a Comment

How to type letters with accent

Very useful article https://www.freecodecamp.org/news/how-to-type-letters-with-accents-on-mac/