Added shellcheck source for background script examples

This commit is contained in:
dcoomber 2020-09-27 20:11:28 +02:00
parent 676a69465d
commit d64ba40b63
3 changed files with 6 additions and 2 deletions

View File

@ -24,6 +24,7 @@ unset IFS
# discard STDIN for background jobs!
cat >/dev/null &
# shellcheck source=examples/background-scripts/mycommands.sh
source "./mycommands.sh"
# check if $1 is a number

View File

@ -24,6 +24,8 @@ cat >/dev/null &
# watch for new files created by a trusted program
WATCHDIR="/my_trusted/dir_to_watch"
# shellcheck source=examples/background-scripts/mycommands.sh
source "./mycommands.sh"
# test your script and the remove ...
@ -39,4 +41,3 @@ loop_callback() {
}
watch_dir_loop "$WATCHDIR"

View File

@ -19,11 +19,13 @@ export 'LANGUAGE=C.UTF-8'
unset IFS
# set -f # if you are paranoid use set -f to disable globbing
# discard STDIN for background jobs!
# shellcheck source=examples/background-scripts/mycommands.sh
cat >/dev/null &
# watch for new logfiles
WATCHDIR="/var/log"
# shellcheck disable=SC1091
source "./mycommands.sh"
# test your script and the remove ...