Whoops! You're right. Sorry about that.
DR > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Askadar > Sent: Sunday, January 08, 2006 4:24 PM > To: [email protected] > Subject: Re: [arch] Checking for (root)permissions in various > Archlinux-sc ripts > > > 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 ============================================================================== Please access the attached hyperlink for an important electronic communications disclaimer: http://www.csfb.com/legal_terms/disclaimer_external_email.shtml ============================================================================== _______________________________________________ arch mailing list [email protected] http://www.archlinux.org/mailman/listinfo/arch
