Skip to content

Commit

Permalink
change syntax of check_root_function
Browse files Browse the repository at this point in the history
  • Loading branch information
dolevf committed Apr 23, 2024
1 parent aadf4ae commit 9266860
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ch02/check_root_function.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ check_if_root(){
fi
}

is_root=$(check_if_root)
if [[ "${is_root}" -eq "0" ]]; then
if check_if_root; then
echo "User is root!"
else
echo "User is not root!"
Expand Down

0 comments on commit 9266860

Please sign in to comment.