]> arthur.barton.de Git - backup-script.git/commitdiff
backup-script: Fix two warnings of shellcheck(1)
authorAlexander Barton <alex@barton.de>
Wed, 10 Jan 2018 10:38:19 +0000 (11:38 +0100)
committerAlexander Barton <alex@barton.de>
Wed, 10 Jan 2018 10:38:19 +0000 (11:38 +0100)
ID [SC1117]:
'Backslash is literal in "\n". Prefer explicit escaping: "\\n".'

bin/backup-script

index 1cf84f957a806aafbeb461a1a663268ab84aaf95..89b066db8bddddcabff66b15c30df1ebfd161e62 100755 (executable)
@@ -75,7 +75,7 @@ Usage() {
 }
 
 ErrorMsg () {
-       printf "%s\n" "$@" >&2
+       printf "%s\\n" "$@" >&2
 }
 
 CleanUp() {
@@ -303,7 +303,7 @@ if [ -r "$conf" ]; then
 else
        config_info="${config_info} (not readable, using defaults)"
 fi
-config_info="${config_info},\nusing \"$conf_d\" as configuration directory."
+config_info="${config_info},\\nusing \"$conf_d\" as configuration directory."
 
 while [ $# -gt 0 ]; do
        case "$1" in