]> git.proxmox.com Git - mirror_iproute2.git/commit
examples: Some shell fixes to cbq.init
authorPhil Sutter <phil@nwl.cc>
Thu, 17 Aug 2017 17:09:31 +0000 (19:09 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 18 Aug 2017 16:11:00 +0000 (09:11 -0700)
commit2313b6bfe4f5e6b60fcdfaaeaa1eabcfd3f550f4
treeef7cff2d5b9d49bce1427337c8d65175fba16a8c
parente5fa0e6fe75d16e0e317dded699e2786f997bc8f
examples: Some shell fixes to cbq.init

This addresses the following issues:

- $@ is an array, so don't use it in quoted strings - use $* instead.

- Add missing quotes to components of [ ] expressions. These are not
  strictly necessary since the output of 'wc -l' should be a single word
  only, but in case of errors, bash prints "integer expression expected"
  instead of "too many arguments".

- Use -print0/-0 when piping from find to xargs to allow for filenames
  which contain whitespace.

- Quote arguments to 'eval' to prevent word-splitting.

Signed-off-by: Phil Sutter <phil@nwl.cc>
examples/cbq.init-v0.7.3