Monday, December 04, 2006

Shell Script: 確定user目前是否登入系統

Filename: finduser

#!/bin/bash

if [ $# -ne 1 ]; then
echo "usage: finduser username"
else
who | grep "$1"
fi

No comments: