linux-tutorial/codes/shell/进阶脚本/查看uptime获取在线用户数.sh
2019-10-29 18:22:19 +08:00

5 lines
71 B
Bash

#!/usr/bin/env bash
#
uptime | sed 's/user.*$//' | gawk '{print $NF}'