I have a bash script that is run by an automation.
It should write all output to a log but, weirdly, rather than the filetype being “.log”, it is “.log?”.
My script is below plus screenshots of how it appears in ha terminal and via my windows folder map.
#!/bin/bash
LOGFILE="/config/shellcommands/copybackground.log"
(
echo "$(date "+%d%m%Y %T") : Starting work"
rm /config/www/images/backgrounds/current/background.jpg
cp -f /config/www/images/backgrounds/$1 /config/www/images/backgrounds/current/background.jpg
echo error 1>&2 # test stderr
echo "$(date "+%d%m%Y %T") : Done"
) >& $LOGFILE
update: same thing is happening to the copied jpg file ie it ends “.jpg?”
1 post - 1 participant