Files
oldlinux-files/Linux-0.98/Yggdrasil-0.98.3/usr/bin/mesg
2024-02-19 00:21:16 -05:00

18 lines
207 B
Bash
Executable File

#! /bin/sh
case $1 in
y*|Y*)
chmod og+w `tty`
;;
n*|N*)
chmod og-w `tty`
;;
*)
if ls -l `tty` | grep 'rw--w--w-' > /dev/null; then
echo "mesg is y"
else
echo "mesg is n"
fi
;;
esac