#!/bin/bash
input=""
echo "Does a wall needs to be sent?"
read input
if [ $input="yes" ]; then
echo "Sending message to all users"
echo ""
else if [ $input="no"]; then
exit
fi
fi
echo "Is this a reboot or shutdown?"
read input
if [ $input="reboot" ]; then
reboot
elif [ $input="shutdown" ]; then
else
echo ""
echo "Goodbye"
Take the 2-minute tour
×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
||||
closed as off-topic by jasonwryan, slm♦ Jul 12 at 3:57This question appears to be off-topic. The users who voted to close gave this specific reason:
|
||||
That script has a bunch of issues. Here's a cleaned up version:
Honestly though, this is still really poorly done. I would recommend using |
|||||
|
[ $input = "yes" ]
... – jasonwryan Jul 12 at 3:31