38 lines
657 B
Bash
Executable File
38 lines
657 B
Bash
Executable File
#!/bin/bash
|
|
#xcrypted
|
|
|
|
source ${LIBSH}/libeval.sh
|
|
|
|
|
|
#-----------------------------------------
|
|
challenge=C15Q4
|
|
rep=~/Sequence1/A15
|
|
fichier=liste-mooc-international.txt
|
|
attendu="Tori Stjames +33123640487"
|
|
#-----------------------------------------
|
|
# Debut
|
|
banniere $challenge
|
|
|
|
# 1
|
|
[ $(pwd) == "$rep" ]
|
|
step $(vraifaux $?) "Le repertoire courant est $rep"
|
|
|
|
|
|
#2
|
|
[ -e $fichier ]
|
|
step $(vraifaux $?) "Le fichier $fichier existe " true
|
|
|
|
|
|
line=$(tail -2 $fichier | head -1)
|
|
#3
|
|
[ "$line" == "$attendu" ]
|
|
step $(vraifaux $?) "l'ajout de l'indicatif a ete correctement fait"
|
|
|
|
#
|
|
#-----------------------------------------
|
|
# Fin
|
|
status "${challenge}_$res"
|
|
exit 0
|
|
|
|
|