79433627

Date: 2025-02-12 15:37:12
Score: 1
Natty:
Report link

I am running sudo 1.9.13p2 on MAC OSX, and sudo has a -l option to do that, so in a bash script:

if sudo -l > /dev/null; then
    echo "This is sudoed"
else
    echo "This is NOT sudoed"
fi
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Vincent Belaïche