Linux v69820.1blu.de 4.15.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
Apache/2.4.58
Server IP : 195.90.215.149 & Your IP : 216.73.217.80
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
doc /
node-optimist /
examples /
Delete
Unzip
Name
Size
Permission
Date
Action
bool.js
231
B
-rw-r--r--
2022-04-19 11:28
boolean_double.js
149
B
-rw-r--r--
2022-04-19 11:28
boolean_single.js
119
B
-rw-r--r--
2022-04-19 11:28
default_hash.js
124
B
-rw-r--r--
2022-04-19 11:28
default_singles.js
133
B
-rw-r--r--
2022-04-19 11:28
divide.js
155
B
-rw-r--r--
2022-04-19 11:28
line_count.js
405
B
-rw-r--r--
2022-04-19 11:28
line_count_options.js
631
B
-rw-r--r--
2022-04-19 11:28
line_count_wrap.js
755
B
-rw-r--r--
2022-04-19 11:28
nonopt.js
114
B
-rw-r--r--
2022-04-19 11:28
short.js
93
B
-rw-r--r--
2022-04-19 11:28
string.js
213
B
-rw-r--r--
2022-04-19 11:28
usage-options.js
440
B
-rw-r--r--
2014-02-05 15:41
xup.js
189
B
-rw-r--r--
2022-04-19 11:28
Save
Rename
#!/usr/bin/node var argv = require('optimist') .usage('Count the lines in a file.\nUsage: $0') .wrap(80) .demand('f') .alias('f', [ 'file', 'filename' ]) .describe('f', "Load a file. It's pretty important." + " Required even. So you'd better specify it." ) .alias('b', 'base') .describe('b', 'Numeric base to display the number of lines in') .default('b', 10) .describe('x', 'Super-secret optional parameter which is secret') .default('x', '') .argv ; var fs = require('fs'); var s = fs.createReadStream(argv.file); var lines = 0; s.on('data', function (buf) { lines += buf.toString().match(/\n/g).length; }); s.on('end', function () { console.log(lines.toString(argv.base)); });