我尝试了解以下代码为何失败。首先,我使用
调用bash函数smb_read $SMB_FILE $SMB_CONF
功能很简单
function smb_read {
2="$(cat $1)"
case $? in
0) ;;
*) return 1 ;;
esac
}
结果是
func.sh: line 52: 2=[global]
workgroup = smb
security = user
...
public = no
writeable = no
guest ok = no
create mask = 0600
directory mask = 0700: No such file or directory
那是为什么?