被这些shell变量搞的很失败啊



#!/bin/sh


HELLO="HELLO"
WORLD="WORLD"
NAME="ZHANGBIN"


echo "HELLO IS $HELLO"
SUN=$WORLD
#"${WORLD}""${NAME}"
echo "SUN IS $SUN"
SUN+=$NAME
echo "SUN2 IS $SUN"
unset SUN
SUN=$(echo "$WORLD$HELLO$NAME")
echo "sun3 is $SUN"
#export HELLO+="${WORLD}"
#echo "parameter 1 is $HELLO"
SKAV_UTILS_LIB_LIST=-list
LIBS=11
LIBS+=22
LIBS+=33
export LIBS="$LIBS -L${SKAV_LIST_LIB}"
echo "###$LIBS"



root@Ubuntu64:/home/zhangbin/codeStore/testReplaceOneLine# sh test.sh

HELLO IS HELLO
SUN IS WORLD
test.sh: 11: test.sh: SUN+=ZHANGBIN: not found
SUN2 IS WORLD
sun3 is WORLDHELLOZHANGBIN
test.sh: 20: test.sh: LIBS+=22: not found
test.sh: 21: test.sh: LIBS+=33: not found
###11 -L

root@Ubuntu64:/home/zhangbin/codeStore/testReplaceOneLine# 




你可能感兴趣的:(被这些shell变量搞的很失败啊)