#!/bin/bash a=23 echo '$a' echo "$a" your_name='runoob' str="Hello, I know you are "$your_name"! " echo -e $str echo $str
输出
bogon:Desktop macname$ ./test.sh $a 23 Hello, I know you are "runoob"! Hello, I know you are "runoob"!
参考:
#!/bin/bash a=23 echo '$a' echo "$a" your_name='runoob' str="Hello, I know you are "$your_name"! " echo -e $str echo $str
输出
bogon:Desktop macname$ ./test.sh $a 23 Hello, I know you are "runoob"! Hello, I know you are "runoob"!
参考: