34 lines
636 B
Bash
Executable File
34 lines
636 B
Bash
Executable File
#!/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" -o "$line" == "monrep=${rep}/" ]
|
|
step $(vraifaux $?) "C'est la commande attendue " false
|
|
|
|
|
|
#-----------------------------------------
|
|
# Fin
|
|
status "${challenge}_$res"
|
|
exit 0
|