xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

Node.js cli & Linux process exit code All In One

Node.js cli & Linux process exit code All In One

exit(0) & exit(1)

exit code

  1. exit(0) === OK
  2. exit(1) === some error occurred

bash

https://askubuntu.com/questions/892604/meaning-of-exit-0-exit-1-and-exit-2-in-a-bash-script

exit also makes your script stop execution at that point and return to the command line.

Caveat: Using the proper exit code is not a requirement and is not enforced by the shell. Developers can ignore the guidance if they think it wise.

警告:使用正确的退出代码不是必需的,并且不会由shell强制执行。 如果他们认为明智,开发人员可以忽略指导。

http://www.tldp.org/LDP/abs/html/exitcodes.html

demos

hui-cli

An Vue cli tools for back-end developers quickly generator an h_ui project with zero-config!

https://www.npmjs.com/package/hui-cli

https://github.com/xgqfrms/hui-cli

// cli 自动安装依赖包
shell.exec(`cd hui-app & npm i`);

(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!

Linux shell commnad > & >>

覆盖 & 追加


$ echo > readme.md

$ echo >> readme.md

https://unix.stackexchange.com/questions/89386/what-is-symbol-and-in-unix-linux

OK

refs

https://stackoverflow.com/questions/9944785/what-is-the-difference-between-exit0-and-exit1-in-c

https://www.cnblogs.com/nufangrensheng/archive/2013/03/01/2938508.html

https://www.cnblogs.com/ECJTUACM-873284962/p/6882448.html



©xgqfrms 2012-2021

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2019-05-28 09:00  xgqfrms  阅读(345)  评论(4编辑  收藏  举报