瘋狂帽客's Blog
You are already naked. There is no reason not to follow your heart. ~ Steve Jobs ~
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:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment