3 TTYS=`who | grep $USER | tr -s ' ' | cut -d' ' -f2 | grep -v :`
6 if ! tty > /dev/null; then
7 echo "stdin is not a tty" >&2
11 elif [ -c "$1" ]; then
13 elif [ -c "/dev/$1" ]; then
16 echo "No such device: $1"
20 BASEHERE=`echo $HERE | sed 's|^/dev/||'`
22 if [ -c $HERE ] && echo $TTYS | grep '\<'$BASEHERE'\>' > /dev/null; then
23 for tty in $TTYS; do [ "$BASEHERE" != "$tty" -a -c /dev/$tty ] && chmod g-w /dev/$tty; done
26 echo "You are not logged in on $BASEHERE" >&2