scripts dutchification - batch 1

This commit is contained in:
bergware
2023-10-02 20:08:09 +02:00
parent e46a8991c4
commit e43ea0e162
+3 -1
View File
@@ -18,7 +18,9 @@ run(){
log(){
if [[ ! -t 0 ]]; then
# log message to syslog
logger -t $BASENAME "${1:-$(</dev/stdin)}"
while IFS='\n' read -r LINE; do
logger -t $BASENAME "$LINE"
done <<< ${1:-$(</dev/stdin)}
else
# echo message to console
[[ -n $1 ]] && echo "$1"