diff options
author | Brian Behlendorf <[email protected]> | 2018-01-17 10:17:16 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2018-01-17 10:17:16 -0800 |
commit | 3da3488e6339ff2dc5c7f3da8c8a0c552d018d68 (patch) | |
tree | acf9843a79221a7fa9de852507d3cdef8772ee44 /scripts/zloop.sh | |
parent | d658b2caa95726c13d99123874910cdedc7ce866 (diff) |
Fix shellcheck v0.4.6 warnings
Resolve new warnings reported after upgrading to shellcheck
version 0.4.6. This patch contains no functional changes.
* egrep is non-standard and deprecated. Use grep -E instead. [SC2196]
* Check exit code directly with e.g. 'if mycmd;', not indirectly
with $?. [SC2181] Suppressed.
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #7040
Diffstat (limited to 'scripts/zloop.sh')
-rwxr-xr-x | scripts/zloop.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/zloop.sh b/scripts/zloop.sh index 2fcc807cd..4e0afac5b 100755 --- a/scripts/zloop.sh +++ b/scripts/zloop.sh @@ -70,12 +70,12 @@ function or_die # core file helpers origcorepattern="$(cat /proc/sys/kernel/core_pattern)" -coreglob="$(egrep -o '^([^|%[:space:]]*)' /proc/sys/kernel/core_pattern)*" +coreglob="$(grep -E -o '^([^|%[:space:]]*)' /proc/sys/kernel/core_pattern)*" if [[ $coreglob = "*" ]]; then echo "Setting core file pattern..." echo "core" > /proc/sys/kernel/core_pattern - coreglob="$(egrep -o '^([^|%[:space:]]*)' \ + coreglob="$(grep -E -o '^([^|%[:space:]]*)' \ /proc/sys/kernel/core_pattern)*" fi @@ -243,7 +243,7 @@ while [[ $timeout -eq 0 ]] || [[ $curtime -le $((starttime + timeout)) ]]; do echo "$desc" >>ztest.out $cmd >>ztest.out 2>&1 ztrc=$? - egrep '===|WARNING' ztest.out >>ztest.history + grep -E '===|WARNING' ztest.out >>ztest.history $ZDB -U "$workdir/zpool.cache" -DD ztest >>ztest.ddt 2>&1 store_core |