-
Notifications
You must be signed in to change notification settings - Fork 1.8k
SC2265
Joachim Ansorg edited this page May 3, 2025
·
2 revisions
if [ "$1" = "install" ] & [ "$USER" != "root" ]
then
echo "Must be root to install"
fi
if [ "$1" = "install" ] && [ "$USER" != "root" ]
then
echo "Must be root to install"
fi
ShellCheck found a test
command followed by a &
. This runs the test in the background, effectively ignoring it. To specify "logical AND" between two commands, use &&
.
None
- Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!