35 lines
580 B
Bash
Executable File
35 lines
580 B
Bash
Executable File
#!/bin/bash
|
|
# Auteur: Pascal ANELLI
|
|
# 6 fev 2020
|
|
# Session 3
|
|
|
|
source ${LIBSH}/libeval.sh
|
|
|
|
#-------------------------
|
|
rep=/home/alice/Sequence2/A24
|
|
challenge=C24Q3
|
|
#-------------------------
|
|
# Debut
|
|
banniere $challenge
|
|
|
|
jobs="$(mktemp)"
|
|
|
|
ps >|$jobs
|
|
|
|
# 1 number of jobs
|
|
[ $(cat $jobs | wc -l) -eq 6 ]
|
|
step $(vraifaux $?) "le nombre de processus restant est correct"
|
|
|
|
# 2 bill is dead
|
|
$(cat "$jobs" | grep "bill")
|
|
[ $? -eq 1 ] # Not found
|
|
step $(vraifaux $?) "le processus cible a ete supprime "
|
|
|
|
#-------------------------
|
|
# Fin
|
|
status "${challenge}_$res"
|
|
|
|
rm $jobs
|
|
exit 0
|
|
|