shell/shell脚本编程进阶/查看uptime获取在线用户数.sh

4 lines
62 B
Bash
Raw Normal View History

2016-05-23 08:32:00 +08:00
#!/bin/bash
#
uptime | sed 's/user.*$//' | gawk '{print $NF}'