Files
Server-scripts/quiethost/findPanorama.sh
T
2026-09-14 12:43:38 +02:00

17 lines
512 B
Bash
Executable File

#!/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