Files
Server-scripts/quiethost/findPanorama.sh
T

16 lines
512 B
Bash
Raw Normal View History

2026-04-14 23:55:46 +02:00
#!/bin/bash
IFS=$'\n'; set -f
ARR=($(find . \( -name "*.png" -or -name "*.jp*g" \) | grep -v xml))
unset IFS; set +f
for ((i=0;i<${#ARR[@]};i++)); do
NUM1=$(identify "${ARR[i]}" | rev | cut -f7 -d' ' | rev | cut -f1 -d'x')
NUM2=$(identify "${ARR[i]}" | rev | cut -f7 -d' ' | rev | cut -f2 -d'x')
echo "${ARR[i]}"
if [[ "$NUM1" != "" && $NUM2 != "" ]]; then
if [[ $NUM1 -gt $(( $NUM2 * 3 )) ]]; then
identify "${ARR[i]}" >> panoramaImages.txt
cp "${ARR[i]}" /home/lucas/Downloads/
fi
fi
done