Ex. I have one script Test.sh
#!/bin/sh
echo "/n read the value"
read info
if [ "$info" = 1 ];
then
echo "yes"
else
echo "no"
fi
I want to call Test.sh script from another script (test2.sh) in nohup mode. Is there any way i can provide the value to "read info" by passing with arguments/ any other way.
test2.sh
#!/bin/sh
Test.sh
read
will consume one "line", by default terminated with\n
. Seehelp read
. – l0b0 Sep 11 '19 at 10:07echo "/n read the value1" read info1
echo "/n read the value2" read info2
echo "$info1 $info2">>log.txt
– jazz Sep 12 '19 at 07:14