Uname : Linux serv1.rebootns.com 5.14.0-570.62.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 10:10:59 EST 2025 x86_64
Soft : LiteSpeed
Ip : 139.99.125.122
Port : 443
~
/
opt
/
alt
/
alt-nodejs22
/
root
/
usr
/
lib
/
node_modules
/
npm
/
node_modules.bundled
/
which
/
bin
[ HOME ]
Exec
Submit
File Name : which.js
#!/opt/alt/alt-nodejs22/root/usr/bin/node const which = require('../lib') const argv = process.argv.slice(2) const usage = (err) => { if (err) { console.error(`which: ${err}`) } console.error('usage: which [-as] program ...') process.exit(1) } if (!argv.length) { return usage() } let dashdash = false const [commands, flags] = argv.reduce((acc, arg) => { if (dashdash || arg === '--') { dashdash = true return acc } if (!/^-/.test(arg)) { acc[0].push(arg) return acc } for (const flag of arg.slice(1).split('')) { if (flag === 's') { acc[1].silent = true } else if (flag === 'a') { acc[1].all = true } else { usage(`illegal option -- ${flag}`) } } return acc }, [[], {}]) for (const command of commands) { try { const res = which.sync(command, { all: flags.all }) if (!flags.silent) { console.log([].concat(res).join('\n')) } } catch (err) { process.exitCode = 1 } }
Back
Folder Name
Submit
File Name
File Content
Submit
Name
Type
Size
Permission
Last Modified
Actions
.
dir
-
0755
2025-11-16 11:16:21
..
dir
-
0755
2025-11-16 11:16:21
which.js
file
982 B
0755
2025-08-28 12:24:05