summaryrefslogtreecommitdiff
path: root/bin/greet
blob: 947958e8f11922d43c2c3d472680793a396b748f (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

cd "$(dirname "$0")/.."
USER=${1}

if cat /etc/passwd | cut -d: -f1 | grep -E "^$USER"; then
  echo "hello" | write "$USER"
else
  echo "I could not find '${USER}'"
  exit 1
fi