Code as example:
Code:
comm1=$(exiftool -fast5 -s -S -Comment "$file0")
if [[ $comm1 = *"creator:gd-jpeg"* ]] || [[ $comm1 = *"CREATOR:GD-JPEG"* ]] ; then
echo -e "$file0 has a \"libgd\" Comment. Writing to file."
echo -e "$file0">>had-GD-comment.txt
jhead -dc "$line"
echo -e "Comment data removed from $file0."
echo -e "$file0">>comment-cleared.txt
fi
Two pipes between conditions in an if statement still means "or," doesn't it? Has the
word "or" been totally worked out of bash 4? Anyway, when the script is run, and the conditions are met, it fails to create either text file in the above "if-then" to record which files
did have JPEG comments with the gd-jpeg string (lower- or uppercase) in them.
And so I'm thinking I might be writing these "double ifs" incorrectly.
Any thoughts from the Peanut Gallery?
Carver