日期:2014-05-16  浏览次数:20612 次

Linux脚本简单语法
#!/bin/sh
if[ 1=1 ]; then
echo 1
fi

异常:syntax error near unexpected token 'then'

躺着也中枪?

------解决方案--------------------
if和[之间加个空格。

------解决方案--------------------
if [ 1=1 ]