From 9a15ab7ff01e4567d66e8b939b0008d8b14ff91b Mon Sep 17 00:00:00 2001 From: owen Date: Wed, 12 Oct 2022 10:38:51 +0200 Subject: [PATCH] ajout 8/ 9/ --- STOP | 0 monshell3.sh | 9 +++++++++ until2.sh | 13 +++++++++++++ while.sh | 13 +++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 STOP create mode 100755 monshell3.sh create mode 100755 until2.sh create mode 100644 while.sh diff --git a/STOP b/STOP new file mode 100644 index 0000000..e69de29 diff --git a/monshell3.sh b/monshell3.sh new file mode 100755 index 0000000..a841672 --- /dev/null +++ b/monshell3.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +nombre=100 + +until [[ $nombre -eq 0 ]] +do + echo $nombre + nombre=$((nombre -1)) +done diff --git a/until2.sh b/until2.sh new file mode 100755 index 0000000..50d785a --- /dev/null +++ b/until2.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +var=1 + +until [[ var -ne 1 ]] +do + echo "Texte" + sleep 2 + if [ -e STOP ] + then + var=0 + fi +done \ No newline at end of file diff --git a/while.sh b/while.sh new file mode 100644 index 0000000..2c8e6fd --- /dev/null +++ b/while.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +var=1 + +while [[ var -eq 1 ]] +do + echo "Texte" + sleep 2 + if [ ! -e GO ] + then + var=0 + fi +done \ No newline at end of file