dotfiles/script/sysinfo

12 lines
176 B
Bash
Executable File

#!/usr/bin/env bash
#
# Print loadavg to stdout
set -e
if [ $(uname -s) = "Darwin" ]; then
w | head -n1 | cut -d":" -f3
else # Linux
cut -d " " -f 1-3 /proc/loadavg
fi