35 lines
703 B
Plaintext
35 lines
703 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
source ${LIBSH}/libeval.sh
|
||
|
|
||
|
#-----------------------------------------
|
||
|
challenge=C15Q3
|
||
|
rep="/home/alice/Sequence1/A15"
|
||
|
fichier=liste-mooc-nouveau.txt
|
||
|
attendu="Pauline Kazoo 0123456789"
|
||
|
#-----------------------------------------
|
||
|
# Debut
|
||
|
banniere $challenge
|
||
|
|
||
|
# 1
|
||
|
[ $(pwd) == "$rep" ]
|
||
|
step $(vraifaux $?) "Le repertoire courant est $rep"
|
||
|
|
||
|
|
||
|
#2
|
||
|
[ -e $fichier ]
|
||
|
step $(vraifaux $?) "Le fichier $fichier existe " true
|
||
|
|
||
|
#3
|
||
|
newline=$(cat $fichier | sed -n '72p' | expand | tr -s ' ' )
|
||
|
[ "$newline" == "$attendu" ]
|
||
|
step $(vraifaux $?) "Le ligne 72 est $attendu"
|
||
|
|
||
|
#-----------------------------------------
|
||
|
# Fin
|
||
|
status "${challenge}_$res"
|
||
|
exit 0
|
||
|
|
||
|
# listcode = [ '000', '288', '004', '4a6' ]
|
||
|
|