Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一部分shell脚本如下..
火花数据=spark-shell << EOF spark.sql(query) EOF
spark-shell << EOF spark.sql(query) EOF
我需要 spark.sql 查询的退出状态..有人可以帮忙吗..
等待您的回复谢谢
由于赋值是另一个命令的一部分,赋值的退出状态是命令替换的退出状态。
$ foo=$(cat <<EOF > hi > there > EOF > exit 9) $ echo $? 9 $ echo "$foo" hi there