#!/usr/bin/env bash #------------------------------------------------------------------------------ # Path - /usr/bin/bulkresize # GitHub - https://github.com/The-Repo-Club/ # Author - The-Repo-Club [wayne6324@gmail.com] # Start On - Sun 31 Oct 00:30:03 BST 2021 # Modified On - Sun 31 Oct 00:30:03 BST 2021 #------------------------------------------------------------------------------ size=1920x1080 # Catch user input for file type. echo "Enter the file extension for your image files:" # Store user input in $files. read ext # Resize images. for img in *.$ext; do mkdir -p "resize" convert -resize $size! "$img" "resize/$img" printf "converting %s to %s\n" "$img" "$size" done