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 <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #7040
This commit is contained in:
Brian Behlendorf
2018-01-17 10:17:16 -08:00
committed by Tony Hutter
parent 2a7b736dce
commit 9d1a39cec6
4 changed files with 11 additions and 11 deletions
@@ -410,7 +410,7 @@ function get_xattr #<obj>
fi
for xattr in `runat $obj ls | \
/usr/xpg4/bin/egrep -v -e SUNWattr_ro -e SUNWattr_rw` ; do
grep -E -v -e SUNWattr_ro -e SUNWattr_rw` ; do
runat $obj sum $xattr
done
}