Skip to content

Instantly share code, notes, and snippets.

View genevievecurry's full-sized avatar
🤖

Genevieve Curry genevievecurry

🤖
View GitHub Profile
@genevievecurry
genevievecurry / bulk-image-processing.sh
Last active March 22, 2021 16:48
[Bulk Image Processing] Shell script that saves original, resizes, and compresses images.
#!/bin/sh
# Go to the root of images folder
# Run for each type of image, for example, PNG:
# $ find . -type f -name '*.png' -exec ~/path/to/script/bulk-image-processing.sh {} \; 2>&1 | tee log-png.txt;
file="${1}"
basename=${file%.*}
extension="${file##*.}"
copiedFile="$basename"_"ORIGINAL.$extension"