Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Picasoft
APIs
Init
Sh
Commits
2cd4a04a
Unverified
Commit
2cd4a04a
authored
Jan 17, 2019
by
Rémy Huet
💻
Browse files
Afficher une variable
parent
a152d4d2
Pipeline
#33583
passed with stage
in 16 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/tex/variables.tex
View file @
2cd4a04a
...
...
@@ -47,6 +47,28 @@ remy@hp-remy:~/scripts$ ./script.sh \Pause
\end{beamercolorbox}
\Pause
\begin{block}
{
Réponse
}
Parce que notre script ne fait qu'
\textbf
{
affecter
}
une valeur à une variable! On ne lui a jamais rien demandé d'afficher !
Parce que notre script ne fait qu'
\textbf
{
affecter
}
une valeur à une variable!
On ne lui a jamais rien demandé d'afficher !
\end{block}
\end{frame}
\begin{frame}
[fragile]
{
Lire une variable
}
\begin{block}
{
Accéder au contenu
}
Pour accéder au contenu d'une variable, il faut écrire son
\textcolor
{
red
}{
\bf
nom
}
, précédé du symbole
\textcolor
{
red
}{
\bf
\$
}
\end{block}
On modifie le fichier
\texttt
{
script.sh
}
:
\begin{beamercolorbox}
[rounded=true, shadow=true]
{
terminal
}
\begin{Verbatim}
#!/bin/bash
ma
_
variable='Salut tout le monde'
echo
$
ma
_
variable
\end
{
Verbatim
}
\end
{
beamercolorbox
}
En executant le script, on obtient :
\begin
{
beamercolorbox
}
[
rounded
=
true,shadow
=
true
]
{
terminal
}
\begin
{
Verbatim
}
remy@hp
-
remy:~
/
scripts
$
./script.sh
\Pause
Salut tout le monde
\end{Verbatim}
\end{beamercolorbox}
\end{frame}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment