This has driven me crazy so I hope someone can help. I have a script that works perfectly when executed manually or when restarting lightdm, but when it runs during a boot and auto-login, it returns a literal * instead of using it as a wildcard. It is set to run from
the script includes:
fileName=( /media/pi/DISPLAY/display.* ) [[ -e $fileName ]]
I have used other iterations of code and search methods, but all have the same results. When this script is run under any circumstances other than a boot/login it returns a $fileName something like:
However, when the pi boots and performs its auto-login, it returns the exact $fileName of:
I have tried any number of alernative coding solutions, and even started with a simple find command. However, everything I do has the same results of working with:
./finder.sh sudo systemctl restart lightdm
but nothing I have tried works during the normal boot process and always returns a literal * instead of wilcard results.