本文介绍了反正摆脱命令行C程序的返回值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我明白,如果我写bash脚本,我可以得到的返回值,但反正是有得到没有脚本的返回值,只是命令行?
I understand if I write a bash script I can get the return value, but is there anyway to get the return value without scripting, and just command line?
推荐答案
是的,你会在一个Bash脚本的方式相同。运行您的程序是这样的:
Yes, the same way you'd do in a Bash script. Run your program like this:
./your_program; echo $?
这篇关于反正摆脱命令行C程序的返回值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!