Skip to content
GitLab
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
da02dfd2
Unverified
Commit
da02dfd2
authored
Jan 02, 2019
by
Rémy Huet
💻
Browse files
Hello World
parent
892d32eb
Pipeline
#32764
failed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
main.tex
View file @
da02dfd2
...
...
@@ -14,9 +14,9 @@
\usepackage
{
tikz
}
\hypersetup
{
pdfauthor=
{
Rémy Huet
}
,
pdftitle=
{
Api/casoft Init - Jour 3 partie 1 :
sh
}
pdfsubject=
{
Formation sh
}
,
pdfkeywords=
{
scipts, linux, GNU/Linux, sh, posix
}
,
pdftitle=
{
Api/casoft Init - Jour 3 partie 1 :
Scripts shell
}
pdfsubject=
{
Formation sh
ell
}
,
pdfkeywords=
{
scipts, linux, GNU/Linux, sh
ell
, posix
}
,
pdfproducer=
{
Latex
}
,
}
...
...
@@ -36,7 +36,7 @@ pdfproducer={Latex},
{}
}
\title
[Api/casoft Init - Sh]
{
Api/casoft Init - Jour 3 partie 1 - scripts sh
}
\title
[Api/casoft Init - Sh
ell
]
{
Api/casoft Init - Jour 3 partie 1 - scripts sh
ell
}
\titlegraphic
{
\includegraphics
[width=5em]
{
./imgs/picasoft
_
logo.png
}
\\
\href
{
https://creativecommons.org/licenses/by-sa/4.0/deed.fr
}{
\includegraphics
[width=4em]
{
./imgs/licence.eps
}}}
\author
[R. Huet]
{
%
\phantom
{
x
}
\hfill
Rémy
{
\sc
Huet
}
\hfill\phantom
{
x
}}
...
...
src/tex/introduction.tex
View file @
da02dfd2
...
...
@@ -57,3 +57,41 @@
\input
{
src/shell/connaitre
_
son
_
shell.tex
}
\end{beamercolorbox}
\end{frame}
\begin{frame}
[fragile]
\frametitle
{
Un tout premier script !
}
\framesubtitle
{
Hello World !
}
Pour nos scripts, on utilisera bash, qui est un bon compromis entre puissance et compatibilité.
On crée donc un fichier :
\begin{beamercolorbox}
[rounded=true, shadow=true]
{
terminal
}
\begin{Verbatim}
remy@hp-remy:~
$
mkdir scripts
\Pause
remy@hp
-
remy:~
$
cd scripts
\Pause
remy@hp-remy:~
$
nano helloWorld.sh
\Pause
\end
{
Verbatim
}
\end
{
beamercolorbox
}
Par convention, on utilisera l'extension
{
\bf
.sh
}
pour tous nos scripts.
\Pause
On écrit donc dans le fichier :
\begin
{
beamercolorbox
}
[
rounded
=
true, shadow
=
true
]
{
terminal
}
\begin
{
Verbatim
}
#
!/
bin
/
bash
echo 'Hello World
!
'
\end
{
Verbatim
}
\end
{
beamercolorbox
}
\Pause
On rend le fichier executable et on lance le script :
\begin
{
beamercolorbox
}
[
rounded
=
true, shadow
=
true
]
{
terminal
}
\begin
{
Verbatim
}
remy@hp
-
remy:~
$
chmod +x helloWorld.sh
\Pause
remy@hp-remy:~
$
.
/
helloWorld.sh
\Pause
Hello World
!
\end
{
Verbatim
}
\end
{
beamercolorbox
}
\end
{
frame
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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