Savoir ID dans un script

gomul -  
jisisv Messages postés 3678 Statut Modérateur -
Bonjour tout le mo nde,

Qqun c comment identifier un user dans un scrirp , je sais qu'il existe une maniere de le choper ms g oublié :'(

Merci .

1 réponse

  1. jisisv Messages postés 3678 Statut Modérateur 936
     
    Quel shell?
    Sous bash:
    [johand@anubis johand]$ echo $UID
    1000
    [johand@anubis johand]$ echo $EUID
    1000
    [johand@anubis johand]$ id johand
    uid=1000(johand) gid=1000(johand) groupes=1000(johand)

    Gates gave you the windows.
    GNU gave us the whole house.(Alexandrin)
    0