PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > commando to know shell in using
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

commando to know shell in using

Réponse
 
LinkBack Outils de la discussion
Vieux 07/03/2007, 13h09   #1
Patrick
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut commando to know shell in using

what' the command that permit to know which shell i'm using? thanks

  Réponse avec citation
Vieux 07/03/2007, 13h34   #2
swami
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: commando to know shell in using

On Mar 7, 5:09 pm, "Patrick" <patrick.mor...@gmail.com> wrote:
> what' the command that permit to know which shell i'm using? thanks


echo $SHELL

  Réponse avec citation
Vieux 07/03/2007, 14h34   #3
Patrick
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: commando to know shell in using

On 7 Mar, 13:34, "swami" <sivaswamim...@gmail.com> wrote:
> On Mar 7, 5:09 pm, "Patrick" <patrick.mor...@gmail.com> wrote:
>
> > what' the command that permit to know which shell i'm using? thanks

>
> echo $SHELL


ok thank you

  Réponse avec citation
Vieux 07/03/2007, 14h47   #4
Radoulov, Dimitre
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: commando to know shell in using


"swami" wrote in message ...
> On Mar 7, 5:09 pm, "Patrick" wrote:
>> what' the command that permit to know which shell i'm using? thanks

>
> echo $SHELL

[...]

$SHELL identifies your default shell ...


% echo $SHELL
/bin/bash
% ps -p $$
PID TTY TIME CMD
21531 pts/3 00:00:00 zsh


Dimitre


  Réponse avec citation
Vieux 08/03/2007, 02h30   #5
Kalyan Manchikanti
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: commando to know shell in using

On Mar 7, 7:47 am, "Radoulov, Dimitre" <cichomit...@gmail.com> wrote:
> "swami" wrote in message ...
> > On Mar 7, 5:09 pm, "Patrick" wrote:
> >> what' the command that permit to know which shell i'm using? thanks

>
> > echo $SHELL

>
> [...]
>
> $SHELL identifies your default shell ...
>
> % echo $SHELL
> /bin/bash
> % ps -p $$
> PID TTY TIME CMD
> 21531 pts/3 00:00:00 zsh
>
> Dimitre



$0 can also be used..

[root@comp2]~# echo $SHELL
/bin/bash
[root@comp2]~# ksh
# echo $SHELL
/bin/bash
# echo $0
ksh



  Réponse avec citation
Vieux 08/03/2007, 15h46   #6
Radoulov, Dimitre
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: commando to know shell in using


"Kalyan Manchikanti" wrote in message ...
> On Mar 7, 7:47 am, "Radoulov, Dimitre" wrote:
>> "swami" wrote in message ...
>> > On Mar 7, 5:09 pm, "Patrick" wrote:
>> >> what' the command that permit to know which shell i'm using? thanks

>>
>> > echo $SHELL

>>
>> [...]
>>
>> $SHELL identifies your default shell ...
>>
>> % echo $SHELL
>> /bin/bash
>> % ps -p $$
>> PID TTY TIME CMD
>> 21531 pts/3 00:00:00 zsh

[...]
> $0 can also be used..

[...]
> # echo $SHELL
> /bin/bash
> # echo $0
> ksh



But not with all shells:

oss053% echo $SHELL
/bin/ksh
oss053% ps -p $$
PID TTY TIME CMD
3913 pts/14 0:00 csh
oss053% echo $0
No file for $0

Dimitre


  Réponse avec citation
Vieux 08/03/2007, 22h32   #7
Kalyan Manchikanti
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: commando to know shell in using

On Mar 8, 3:46 pm, "Radoulov, Dimitre" <cichomit...@gmail.com> wrote:
> "Kalyan Manchikanti" wrote in message ...
> > On Mar 7, 7:47 am, "Radoulov, Dimitre" wrote:
> >> "swami" wrote in message ...
> >> > On Mar 7, 5:09 pm, "Patrick" wrote:
> >> >> what' the command that permit to know which shell i'm using? thanks

>
> >> > echo $SHELL

>
> >> [...]

>
> >> $SHELL identifies your default shell ...

>
> >> % echo $SHELL
> >> /bin/bash
> >> % ps -p $$
> >> PID TTY TIME CMD
> >> 21531 pts/3 00:00:00 zsh

> [...]
> > $0 can also be used..

> [...]
> > # echo $SHELL
> > /bin/bash
> > # echo $0
> > ksh

>
> But not with all shells:
>
> oss053% echo $SHELL
> /bin/ksh
> oss053% ps -p $$
> PID TTY TIME CMD
> 3913 pts/14 0:00 csh
> oss053% echo $0
> No file for $0
>
> Dimitre- Hide quoted text -
>
> - Show quoted text -


Right..It worked for most shells (atleast the ones I tried
ksh,bash,sh,zsh,tcsh) . csh is the only one that doesnt like $0.

$strings /bin/csh | grep \$0
No file for $0


  Réponse avec citation
Vieux 10/03/2007, 09h22   #8
Mahurshi Akilla
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: commando to know shell in using

On Mar 7, 4:09 am, "Patrick" <patrick.mor...@gmail.com> wrote:
> what' the command that permit to know which shell i'm using? thanks


echo $SHELL

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h45.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12754 seconds with 16 queries