From b04b3267731ea4e75e80f56542589b245811f65d Mon Sep 17 00:00:00 2001 From: TheodorSmall Date: Thu, 6 Jan 2022 18:28:12 +0000 Subject: [PATCH] =?utf8?q?L=C3=B6sung=20Nr.=202:=20Verwenden=20Sie=20=20an?= =?utf8?q?stelle=20einer=20Liste?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- idiot | 2 +- idiot-generator.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/idiot b/idiot index e4c59c9..bc11860 100755 --- a/idiot +++ b/idiot @@ -1,5 +1,5 @@ #! /bin/bash -args=$2 $3 $4 $5 $6 $7 $8 $9 +args="${@:2:$#}" case $1 in "hinzufügen") git add $args diff --git a/idiot-generator.lua b/idiot-generator.lua index e0eac7b..3545c8a 100755 --- a/idiot-generator.lua +++ b/idiot-generator.lua @@ -18,7 +18,7 @@ pf:close() local f = io.open("idiot", "w") f:write("#! /bin/bash\n") -f:write("args=$2 $3 $4 $5 $6 $7 $8 $9\n") +f:write("args=\"${@:2:$#}\"\n") f:write("case $1 in\n") -- 2.44.0