1 # Helper procedures for the scripts usually run from cron, e.g.
2 # pmlogger_check, pmie_daily, etc
5 # Handle shell expansion and quoting for $dir and adjust $args as
7 # Called with $dir and $args set from reading the control file.
8 # Returns $dir and $args which may be modified.
26 _error "embedded \` without enclosing \": $dir"
33 _error "embedded \$( without enclosing \": $dir"
40 if [ -n "$close_quote" ]
42 # we have a "dir" argument that begins with one of the recognized
43 # quoting mechanisms ... append additional words to $dir (from
44 # $args) until quote is closed
53 newdir="$newdir $word"
59 # quote closed, gather remaining arguments
64 newargs="$newargs $word"
68 newdir="$newdir $word"
78 _error "quote not terminated: $dir $args"
81 $do_shell && dir="`eval echo $dir`"