#!/bin/bash # Simple shell script that uses command substitution and an if statement. # This script has an accompaning man page. # # Written 2002 by Wayne Pollock, Tampa Florida USA. # # $Id: nusers,v 1.1 2003/03/18 08:37:27 wpollock Exp $ COUNT=$(who | wc -l) if [ "$1" = "-v" ] then echo There are $COUNT users on the system now. else echo $COUNT fi