Faire des qcm simplement - retour accueil
git clone git://bebou.netlib.re/qcm
Log | Files | Refs | README |
commit 0e9967045d721d8814358127f927ea1dd9138ded parent b1227e30d7d8247f876704bd228efdd9adab8791 Auteurice: Arthur Pons <arthur.pons@unistra.fr> Date: Thu, 12 Dec 2024 09:14:18 +0100 De "read -p" vers "printf;read" read -p n'est pas posix Diffstat:
M | qcm.sh | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qcm.sh b/qcm.sh @@ -158,7 +158,7 @@ if [ -n "$i" ];then cut -d' ' -f2 | sort | uniq -c) while echo "$existingids" | grep -q " \+[3-9] \+$i";do if [ ! -t 0 ];then echo "id existe déjà"; exit 1; - else read -p "id existe déjà, nouvel id : " i < /dev/tty + else printf "id existe déjà, nouvel id : "; read i < /dev/tty fi done id="$i"