39 lines
612 B
Plaintext
39 lines
612 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
# Modified: 27/03/2020
|
||
|
# P Anelli"
|
||
|
# Session 3
|
||
|
|
||
|
source ${LIBSH}/libeval.sh
|
||
|
|
||
|
#-----------------------------------------
|
||
|
challenge=C31Q2
|
||
|
rep=/home/alice/Sequence3/imdb
|
||
|
#-----------------------------------------
|
||
|
# Debut
|
||
|
banniere $challenge
|
||
|
readline
|
||
|
|
||
|
# 1
|
||
|
[ -n "$line" ]
|
||
|
step $(vraifaux $?) "Votre commande est non vide: " true
|
||
|
|
||
|
#2
|
||
|
eval "$line" 2>|/tmp/error.txt
|
||
|
step $(vraifaux $?) "Votre commande fonctionne: " false
|
||
|
|
||
|
#3
|
||
|
[ "$line" == "monrep=$rep" ]
|
||
|
step $(vraifaux $?) "C'est la commande attendue " false
|
||
|
|
||
|
|
||
|
#-----------------------------------------
|
||
|
# Fin
|
||
|
status "${challenge}_$res"
|
||
|
exit 0
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|