Use command line arguments in Node.js
2013-05-23 10:45
549 查看
var args = process.argv.splice(2); if(!args || args.length ==0){ console.log("no params"); } for(var i=0;i<args.length;i++) console.log(args[i]);
commandline:
node test1.js a b c d
output: a
b
c
d
相关文章推荐
- [Node.js] Pass command line arguments to node.js
- How to Use Buffers in Node.js
- xargs: How To Control and Use Command Line Arguments
- what is app.use in NodeJS/Express
- Node.js async in practice: When to use what?
- Node.js async in practice: When to use what?
- When to use next() and return next() in Node.js
- Command Line Arguments in C++
- Node.js Command Line Options(命令行参数)
- node.js中遇到SyntaxError: Use of const in strict mode
- 在Visual Studio 2010中指定命令行调试参数(Specify Command Line Arguments in Visual Studio 2010)
- Read Unicode characters from command-line arguments in Python 2.x on Windows
- [Node.js] Using npm link to use node modules that are "in progress"
- How to use VirtualBox in Terminal / Command line
- Use BlueStacks in Command Line
- node.js中遇到SyntaxError: Use of const in strict mode
- if can't use ruby in command line
- 10 command line in Linux
- How do I do a bulk insert in MySQL using Node.js
- Can't use Subversion command line client: svn Probably the path to Subversion executable is wrong. Fix it.