debut ecriture test_unitaires var assign resultat de plusieurs commandes

This commit is contained in:
hugogogo
2021-11-30 22:34:34 +01:00
parent 3465354af5
commit 6a077174bc

28
tests/test_unit.sh Normal file
View File

@@ -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"