35 lines
654 B
Bash
Executable File
35 lines
654 B
Bash
Executable File
#!/bin/bash
|
|
#xcrypted
|
|
|
|
source ${LIBSH}/libeval.sh
|
|
|
|
#-----------------------------------------
|
|
challenge=C15Q3
|
|
rep=~/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
|
|
|
|
|