18 lines
207 B
Bash
Executable File
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
|