From 6a077174bc93d9888a284d4ecc804806b0d4d199 Mon Sep 17 00:00:00 2001 From: hugogogo Date: Tue, 30 Nov 2021 22:34:34 +0100 Subject: [PATCH] debut ecriture test_unitaires var assign resultat de plusieurs commandes --- tests/test_unit.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/test_unit.sh diff --git a/tests/test_unit.sh b/tests/test_unit.sh new file mode 100644 index 0000000..fc860c6 --- /dev/null +++ b/tests/test_unit.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +#bash -i &> file.log +#exit + +#myoutput=$(echo "echo hello ; exit" | bash -i) + +#echo "follow\n" +#echo $myoutput + +#echo "echo hello" | (bash -i &>file.log) +#echo hello +#exit + +#echo "echo hello" | bash -i 2>&1 | \ +#( +# read myoutput; +# echo "myoutput :\n"; +# echo $myoutput; +#) + +#myoutput=$(echo "echo hello" | bash -i 2>&1 | (read foo; echo $foo)) + +myoutput=$( (echo "echo hello" ; echo "echo hugo") | bash -i 2>&1) +echo "myoutput :" +echo "$myoutput" + +