标签:shel name tin cname shell 字符串 gre bin oob 字符串
test.sh
#!/bin/bash your_name="runoob" # 使用双引号拼接 greeting="hello, "$your_name" !" greeting_1="hello, ${your_name} !" echo $greeting $greeting_1 # 使用单引号拼接 greeting_2=‘hello, ‘$your_name‘ !‘ greeting_3=‘hello, ${your_name} !‘ echo $greeting_2 $greeting_3
输出
bogon:Desktop macname$ ./test.sh hello, runoob ! hello, runoob ! hello, runoob ! hello, ${your_name} !
标签:shel name tin cname shell 字符串 gre bin oob 字符串
原文地址:https://www.cnblogs.com/sea-stream/p/11403094.html