Я не знаю, плохо это или плохо. Мой сценарий все еще работает нормально, но я должен это исправить?
#!/bin/sh
#This script will send text and maybe images to other computers via ssh and scp.
#Configuration files in same folder
source /Users/jacobgarby/Desktop/messaging/messages.cfg
TIME=$(date +"%H:%M:%S")
CONNECTED[0]="mainmini@192.168.1.65"
if [ -d messages.log ]; then
:
else
touch messages.log
fi
read MSG
if [ "$MSG" == "!help" ]; then
echo ; echo "!clear Clear's your personal chat log."
echo "!ban [usrname] Prevents a user from entering this chat IN DEV."
else
echo "$TIME | $USER | $MSG" >> messages.log; echo >> messages.log; echo >> messages.log
tail messages.log
fi
for CONNECTION in CONNECTED; do
echo "It works"
done
if [ "alerttype" == "notification"]; then
osascript -e 'display notification "You have recieved a message!" with title "Message"'
else
osascript -e 'display dialog "You have recieved a message!" with title "Message"'
fi