90 lines
1.6 KiB
TeX
90 lines
1.6 KiB
TeX
|
\documentclass[a4paper, 12pt]{article}
|
||
|
\usepackage[T1]{fontenc}
|
||
|
\usepackage[utf8]{inputenc}
|
||
|
\usepackage{graphicx}
|
||
|
\usepackage{amsmath}
|
||
|
\usepackage{amsfonts}
|
||
|
\usepackage{amssymb}
|
||
|
\usepackage{color}
|
||
|
\usepackage[french]{babel}
|
||
|
\usepackage[hidelinks]{hyperref}
|
||
|
\usepackage{mathtools}
|
||
|
\usepackage[nottoc, numbib]{tocbibind}
|
||
|
\usepackage{lipsum}
|
||
|
|
||
|
\usepackage{minted}
|
||
|
\newminted{bash}{numbersep=6pt, frame=leftline, xleftmargin=6mm}
|
||
|
|
||
|
\usepackage[
|
||
|
top=1.5cm,
|
||
|
bottom=1.5cm,
|
||
|
left=1.5cm,
|
||
|
right=1.5cm
|
||
|
]{geometry}
|
||
|
|
||
|
\setlength{\parskip}{0.2cm}
|
||
|
|
||
|
\begin{document}
|
||
|
|
||
|
\begin{figure}[t]
|
||
|
\centering
|
||
|
\includegraphics[width=5cm]{inp_n7.jpg}
|
||
|
\end{figure}
|
||
|
|
||
|
\title{
|
||
|
\vspace{4cm}
|
||
|
\textbf{Projet de Systèmes d'Exploitation Centralisés} \\
|
||
|
Question 2
|
||
|
\vspace{2cm}
|
||
|
}
|
||
|
\author{
|
||
|
\vspace{2mm}
|
||
|
Fainsin Laurent
|
||
|
}
|
||
|
\date{
|
||
|
\vspace{7cm} Département Sciences du Numérique \\
|
||
|
Première année \\
|
||
|
2020 — 2021
|
||
|
}
|
||
|
|
||
|
\maketitle
|
||
|
|
||
|
\newpage
|
||
|
|
||
|
Si l'on utilise le shell créé lors de la question 1 on peut alors avoir plusieurs sorties de commandes qui se recouvrent, car l'on attend pas la terminaison de la commande pour en exécuter une autre.
|
||
|
Ainsi l'utilisation de sleep est inutile, comme le démontre l'exemple suivant:
|
||
|
|
||
|
\begin{bashcode}
|
||
|
|
||
|
>>> sleep 10 #inutile ici
|
||
|
>>> sh test.sh
|
||
|
>>> find
|
||
|
>>> .
|
||
|
./Q4.c
|
||
|
./Q4
|
||
|
./Q6
|
||
|
./Q1.c
|
||
|
|
||
|
--- bonjour ---
|
||
|
|
||
|
|
||
|
./readcmd.c
|
||
|
./Q7
|
||
|
./Q6.c
|
||
|
./README.md
|
||
|
./Makefile
|
||
|
./Q1
|
||
|
./Q3
|
||
|
./Q5.c
|
||
|
./jobs.c
|
||
|
./Q3.c
|
||
|
\end{bashcode}
|
||
|
|
||
|
où test.sh possède le code suivant:
|
||
|
\begin{bashcode}
|
||
|
sleep 4
|
||
|
printf "\n\n --- bonjour --- \n\n"
|
||
|
\end{bashcode}
|
||
|
|
||
|
\end{document}
|