0
我全部如何从第二个获得返回值。 Shell脚本在1日执行。 Shell执行? (Unix Korn Shell)
我想知道如何从2nd获得返回值。 shell执行并将其保存在第一个脚本的变量中。
像这样
1日脚本:
Result=$(. /dir/to/mysecond/shell/second_shell.sh "Blue")
echo ${Result}
第二脚本:
if [ $1 == "Blue" ]; then
return_value="The color is blue"
else
return_value="The color is not blue"
fi
return ${return_value}
结果变量是空的第一凭证,任何想法?