#!/bin/bash #This one was easy to do simply but elegance was a harder target #the core of it was w | grep $@ #the "| cut -b 0-9" was necesarry for only the username #the "test $@ = "" ||" prevents a grep error message on failure an if is OK to. test $@ = "" || w | grep $@ | cut -b 1-9