Skip to main content
Post Closed as "Duplicate" by sebasth, Anthony Geoghegan, terdon shell-script

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

#!/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

#!/bin/sh
Test.sh

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

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
Source Link
jazz
  • 27
  • 1
  • 6

is it possible to get the values of read command from script when call in nohup mode

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