{
  "alfredsnippet" : {
    "snippet" : "# Execute a command as root (or sudo)\ndo_with_root() {\n    # already root? \"Just do it\" (tm).\n    if [[ $(whoami) = 'root' ]]; then\n        \"$@\"\n    elif [[ -x \/bin\/sudo || -x \/usr\/bin\/sudo ]]; then\n        echo \"sudo $*\"\n        sudo \"$*\"\n    else\n        exit 1\n    fi\n}\n",
    "uid" : "2AB962D6-D0C5-4980-8A4F-979B6F194111",
    "name" : "conditionally_run_command_with_root_or_sudo",
    "keyword" : ""
  }
}