examples/intro/node_argv.js
console.log(process.argv);
console.log('--------------');
var i;
for (i = 0; i < process.argv.length; i++) {
    console.log(process.argv[i]);
}
$ node examples/intro/nodejs_argv.js foo bar
[ 'node',
  '/Users/gabor/work/training/javascript/examples/intro/nodejs_argv.js',
  'foo',
  'bar' ]
--------------
node
/Users/gabor/work/training/javascript/examples/intro/nodejs_argv.js
foo
bar