linux-tutorial/codes/shell/示例脚本/进阶脚本/查看uptime获取在线用户数.sh

4 lines
62 B
Bash
Raw Normal View History

2019-05-10 11:17:57 +08:00
#!/bin/bash
#
uptime | sed 's/user.*$//' | gawk '{print $NF}'