Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 109130

Log file from bash script ends in "?"

$
0
0

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

2024-10-19

update: same thing is happening to the copied jpg file ie it ends “.jpg?”

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 109130

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>