hostinfo.pl

来自「JdonFramework need above jdk 1.4.0 This」· PL 代码 · 共 21 行

PL
21
字号
#!/usr/bin/perl$who = "/usr/bin/who | wc -l";$ps = "/bin/ps -ef h | wc -l";chomp($numUsers = int( `$who` ));chomp($numProcesses = int( `$ps` ));print "$numUsers\n";print "$numProcesses\n";## The following code prints the system uptime and the hostname. These two# items need to be included in every script that you write and should be the# very last thing that is printed.#chomp($uptime =  `/usr/bin/uptime` );print "$uptime\n";chomp($hostname =  `/bin/hostname` );print "$hostname\n";

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?