From: unbewusst.sein@... (=?ISO-8859-1?Q?Une_B=E9vue?=) Date: 2010-10-07T15:40:37+09:00 Subject: testing if a script is run via sudo Is tehre a way to test if a ruby script is run as a sudoer user ? For the time being i'm using a zsh script to test that however I'd like using ruby only. the zsh i'm using : #! /usr/bin/env zsh [ "$SUDO_USER" -a `id -u` -eq 0 ] || { echo "false" exit 0 } echo "true" exit 0 -- � Comment peser sur le bulletin? Tu t'assieds dessus. � (Anonyme)