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
Bash Variable: define and usage: difference between $NAME and ${NAME}
Guess you like
Origin http://43.154.161.224:23101/article/api/json?id=326282538&siteId=291194637
Ranking