`
BonnieTang
  • 浏览: 2307 次
  • 性别: Icon_minigender_2
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

Bash Variable: define and usage: difference between $NAME and ${NAME}

    博客分类:
  • Unix
阅读更多
Variable: define and usage: difference between $NAME and ${NAME}
1, Define:
NAME="Zara Ali"

2, Use:
Input below in test.ksh

NAME="Zara Ali"
AGE=13
echo $NAME
$ Zara Ali

#use ${NAME} can apend strings and other variable
echo ${NAME}_IS
$ Zara Ali_IS

echo ${NAME}${AGE}
$ Zara Ali13

#print the first parametor
echo ${1}
$ Hello

go to terminal, execute
$ ./test.ksh Hello
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics