Apologies for such a basic question, but I keep reading about bash and trying different things to no avail.
I have this script that I run on a number of selected files. The pathnames of the files are passed to the script in value $*. For every selected file with the type extension of .DNG, a zenity dialog should come up. Here's the script:
Code:
#!/bin/bash
for x in $*
do
if [ "$x" = "*.DNG" ]
then zenity --info --text="$x"
fi
done
exit 0
My test [ "$x" = "*.DNG" ] is obviously wrong. But I've tried it without quotes and it also doesn't work. How should this be stated to work?