Re: Nom du shell courant

Pàgina inicial

Reply to this message
Autor: Stephane Bonhomme
Data:  
A: ML guilde
Assumpte: Re: Nom du shell courant
Tiens c'est étrange sur mon linux (debian), csh connait $0

Du coup j'ai fouillé un peu :

waloo@citrouille:~$ which csh
/bin/csh
waloo@citrouille:~$ ls -l /bin/csh
lrwxrwxrwx 1 root root 21 mar 14 2008 /bin/csh -> /etc/alternatives/csh
waloo@citrouille:~$ ls -l /etc/alternatives/csh
lrwxrwxrwx 1 root root 9 mar 14 2008 /etc/alternatives/csh -> /bin/tcsh
waloo@citrouille:~$ ls -l /bin/tcsh
lrwxrwxrwx 1 root root 13 mar 14 2008 /bin/tcsh -> /usr/bin/tcsh
waloo@citrouille:~$ ls -l /usr/bin/tcsh
-rwxr-xr-x 1 root root 348224 jui 3 2006 /usr/bin/tcsh

tiens tiens en fait csh est un tcsh qui se fait passer pour csh... mais
du coup :


waloo@citrouille:~$ csh
citrouille:~> echo $0
csh

et :
citrouille:~> ps -e | grep $$ | nawk '{ print $4; }'
csh

se trompent tout autant !!! j'utilise tcsh pas csh !


Le mercredi 18 février 2009 à 15:56 +0100, Frédéric a écrit :
> On mercredi 18 février 2009, Marc TERRIER wrote:
>
> > Selon Stephane Bonhomme <stephane@???>:
> >
> > > echo $0
> >
> > Intéressant, car plus concis, mais je viens d'essayer sous csh, et ça me
> > dit "No file for $0" alors que ps -e | grep $$ | nawk '{ print $4; }' me
> > renvoie bien "csh".
>
> L'est nul, csh ;o)
>

-- 
           Stéphane Bonhomme           --           Exselt Services


        Formations, Conseil et Réalisations en Ingénierie Documentaire,
                    Technologies Web et Logiciels Libres 
             stephane@???   -   http://www.exselt.com
                04 57 39 30 78        /      06 88 57 27 08