小编Jac*_*ob_的帖子

messages.sh:第 29 行:[:缺少`]'

我不知道这是一件坏事,还是意味着什么。我的脚本似乎仍然可以正常工作,但我应该修复它吗?

#!/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; …
Run Code Online (Sandbox Code Playgroud)

bash bash-scripting

6
推荐指数
2
解决办法
8315
查看次数

标签 统计

bash ×1

bash-scripting ×1