Refactoring netcardconfig according to 'shellcheck' recommendations
authorMykola Malkov <mmalkov@sipwise.com>
Tue, 27 Mar 2018 14:55:00 +0000 (16:55 +0200)
committerMykola Malkov <mmalkov@sipwise.com>
Tue, 27 Mar 2018 15:02:13 +0000 (17:02 +0200)
commitfdbb486eb8db30a3e052f98375790c1c40a7317c
tree4592d6f57367ee7bca38ee8b88aa39d8de91f017
parent1ab81a8c2479dd16320e9855936a34ee468f8aa0
Refactoring netcardconfig according to 'shellcheck' recommendations

Used 'shellcheck' https://github.com/koalaman/shellcheck recommendations:
SC2088 Tilde does not expand in quotes.
SC2086 Double quote to prevent globbing and word splitting.
SC2166 Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
SC2034 foo appears unused. Verify it or export it.
SC2162 read without -r will mangle backslashes.
SC2196 egrep is non-standard and deprecated. Use grep -E instead.
SC2128 Expanding an array without an index only gives the first element.
SC2068 Double quote array expansions to avoid re-splitting elements.
SC2001 See if you can use ${variable//search/replace} instead.
SC2006 Use $(STATEMENT) instead of legacy `STATEMENT`
SC2144 -e doesn't work with globs. Use a for loop.
sbin/netcardconfig