Files
DEV/SCR/TD05/simoes-6-td05-reponses.txt
Simoes Lukas 2c3e150ec5 wow le tp là
2025-09-04 15:36:55 +02:00

20 lines
727 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

------ TD05 : Le shell, Substitutions - Expressions conditionnelles, Commandes composées ------
1.
Si name est le nom dune variable, alors $name sera substitué par value
x=pop
Alors echo x ; affiche : x, et echo $x ; affiche : <rien>
x=5+7 ; Alors echo $x ; affiche : 5+7
PWD est une variable du shell qui retient le chemin complet vers le r´epertoire de travail
courant :
PWD: The current working directory as set by the cd command.
On veut afficher la chaˆıne de caract`eres :
Working directory: /export/home/students/quidam/SCR/
o`u ce qui vient apr`es les : doit se substituer, `a chaque fois, par le chemin complet du
r´epertoire courant.
Une ligne de commande qui le fait : echo Working directory: $PWD
2.