From cbae5e29ff1889086b0983e91a438e0d8695d10b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjist=C3=B3f?= Date: Sun, 8 Oct 2017 21:02:04 +0200 Subject: [PATCH] now cmd executes commands until 'end' is entered --- demo.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/demo.sh b/demo.sh index a5cd836..ecf6add 100644 --- a/demo.sh +++ b/demo.sh @@ -36,7 +36,9 @@ function execute() function cmd() { - prompt - read command - eval "${command}"; + while : ; do + prompt + read command + [ "$command" != "end" ] && eval "${command}" || break + done }