Am Freitag, 6. Januar 2006 22:11 schrieb Rosenstrauch, David:
>Actually that code wouldn't work for someone who's using sudo:
>
>[EMAIL PROTECTED] ~]$ echo $UID
>1000
>[EMAIL PROTECTED] ~]$ sudo echo $UID
>1000
>
>DR

$UID gets evaluated by bash before sudo is called. So after the evaluation of 
$UID the actual call is:

        sudo echo 1000

More correct would be:
        
        sudo bash -c 'echo $UID'

Cheers,
Bjoern

_______________________________________________
arch mailing list
[email protected]
http://www.archlinux.org/mailman/listinfo/arch

Reply via email to