cd dans un script shell..

2001-10-16 Par sujet Thierry Lombardot
Petite question: Pourquoi une commande telle que cd ne fonctionne pas dans un script shell? exemple: #! /bin/tcsh cd /mon_repertoire/un_autre_repertoire/ -- http://www-internal.alphanet.ch/linux-leman/ avant de poser une question. Ouais, pour se désabonner aussi.

RE: cd dans un script shell..

2001-10-16 Par sujet Jiang Wei
#! /bin/tcsh cd /mon_repertoire/un_autre_repertoire/ Il y a pas d'espace entre #!/bin/tcsh Wei ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or

Re: cd dans un script shell..

2001-10-16 Par sujet Daniel Cordey
On Tuesday 16 October 2001 10:35, Thierry Lombardot wrote: Pourquoi une commande telle que cd ne fonctionne pas dans un script shell? exemple: #! /bin/tcsh cd /mon_repertoire/un_autre_repertoire/ Là, c'est la révolution ! Tu confonds peut-être ton shell et ce que tu éxécute depuis

Re: cd dans un script shell..

2001-10-16 Par sujet Thierry Lombardot
Jiang Wei wrote: #! /bin/tcsh cd /mon_repertoire/un_autre_repertoire/ Il y a pas d'espace entre #!/bin/tcsh Wei Les scripts shells semblent fonctionner avec ou sans espace dans le chemin pour l'interpreteur... Mais la commande cd ne fonctionne pas. Quelle en est la raison? --

RE: cd dans un script shell..

2001-10-16 Par sujet Jean-Luc Jeanneau
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Thierry Lombardot Sent: Tuesday, October 16, 2001 9:36 AM To: [EMAIL PROTECTED] Subject: cd dans un script shell.. Petite question: Pourquoi une commande telle que cd ne fonctionne pas dans

RE: cd dans un script shell..

2001-10-16 Par sujet Marc Martinez
echo cd toto; toto.sh chmod a+x toto.sh . toto.sh -Message d'origine- De : Thierry Lombardot [mailto:[EMAIL PROTECTED]] Envoye : mardi, 16. octobre 2001 10:36 A : [EMAIL PROTECTED] Objet : cd dans un script shell.. Petite question: Pourquoi une commande telle que cd ne fonctionne pas

Re: cd dans un script shell..

2001-10-16 Par sujet Thierry Lombardot
... Pourquoi ? Parceque ton script est un autre process qui s'est éxécuter dans son propre environement. ... Est-ce bien là ton problème ? Daniel Oui...ok, cela fonctionne avec un source...Mais c'est un peu long à écrire à chaque fois. Si j'utilise un alias pour cd

RE: cd dans un script shell..

2001-10-16 Par sujet Marc SCHAEFER
On Tue, 16 Oct 2001, Jiang Wei wrote: Il y a pas d'espace entre #!/bin/tcsh Les systèmes UNIX utilisent #! comme indicateur, et ensuite lancent l'interpréteur qui suit. Les espaces sont normalement ignorés. -- http://www-internal.alphanet.ch/linux-leman/ avant de poser une question. Ouais,

Re: cd dans un script shell..

2001-10-16 Par sujet Marc SCHAEFER
On Tue, 16 Oct 2001, Thierry Lombardot wrote: Pourquoi une commande telle que cd ne fonctionne pas dans un script shell? Cela découle du concept de sous-processus du shell: *chaque* commande est exécutée dans un sous-shell, sauf les commandes internes du shell. Les commandes internes sont par

Re: cd dans un script shell..

2001-10-16 Par sujet Daniel Cordey
On Tuesday 16 October 2001 11:53, Thierry Lombardot wrote: Oui...ok, cela fonctionne avec un source...Mais c'est un peu long à écrire à chaque fois. Si j'utilise un alias pour cd /mon_repertoire/mon_sous_repertoire, ca ne marche pas, car l'alias est executé dans l'autre process? Autre

Re: cd dans un script shell..

2001-10-16 Par sujet Dominique Lovy
Salut, Si j'utilise un alias pour cd /mon_repertoire/mon_sous_repertoire, ca ne marche pas, car l'alias est executé dans l'autre process? Si, ca marche sous (t)csh ! scsun17:/home/lovy) alias cd2 cd data scsun17:/home/lovy) alias cd2 cd data scsun17:/home/lovy) cd2 scsun17:/home/lovy/data)

Re: cd dans un script shell..

2001-10-16 Par sujet Daniel Cordey
On Tuesday 16 October 2001 11:05, Marc SCHAEFER wrote: On Tue, 16 Oct 2001, Jiang Wei wrote: Il y a pas d'espace entre #!/bin/tcsh Les systèmes UNIX utilisent #! comme indicateur, et ensuite lancent l'interpréteur qui suit. Les espaces sont normalement ignorés. Et pour ceux que ces deux

RE: cd dans un script shell..

2001-10-16 Par sujet Jiang Wei
#! as the first two bytes, followed by zero or more spaces, followed by interpreter or interpreter argument, as in: Oui, vous avez raison! Wei ** This email and any files transmitted with it are confidential

Re: cd dans un script shell..

2001-10-16 Par sujet Jean-Albert Ferrez
On Tue, 16 Oct 2001 11:09:10 +0200 (MEST), Marc SCHAEFER [EMAIL PROTECTED] wrote: On Tue, 16 Oct 2001, Thierry Lombardot wrote: Pourquoi une commande telle que cd ne fonctionne pas dans un script shell? Cela découle du concept de sous-processus du shell: *chaque* commande est