Necesito determinar el número de usuarios en el sistema, y si el valor es superior o igual a una variable de conteo de usuarios establecida en el script, imprima cuánto tiempo ha estado funcionando el sistema y cuál es la carga del sistema. ¿Cómo agrego esto a mi eco? Aqui en mi codigo
#!/bin/sh
#
# Syswatch Shows a variety of different task based on my Linux System
#
# description: This script will first check the percentage of the filesystem
# being used. If the percentage is above ___, the root user will
# be emailed. There will be 4 things echoed in this script. The
# first thing being the amount of free/total memory being used,
# second the amount of free/total swap space being used, the
# third is the user count, and the last thing is the amount
# of time that the system has been up for and the system load.
#Prints amount of Free/Total Memory and Swap
free -t -m | grep "Total" | awk '{ print "Free/Total Memory : "$4"/"$2" MB";}'
free -t -m | grep "Swap" | awk '{ print "Free/Total Swap : "$4"/"$2" MB";}'
#Displays the user count for the system
printf "User count is at %d\n" $(who | wc -l)
count=$(who | wc -l)
if [ $count -eq 2 ]
then
echo "The system has been up for _______ with a system load of average: __"
fi
exit 0