例子
1 2 3 4 5 6 7 8 9 10 11 12 13
| #!/bin/bash name="Shell" url="http://c.biancheng.net/shell/" str1=$name$url str2="$name $url" str3=$name": "$url str4="$name: $url" str5="${name}Script: ${url}index.html" echo $str1 echo $str2 echo $str3 echo $str4 echo $str5
|
结果
1 2 3 4 5 6
| Shellhttp://c.biancheng.net/shell/ Shell http://c.biancheng.net/shell/ Shell: http://c.biancheng.net/shell/ Shell: http://c.biancheng.net/shell/ ShellScript: http://c.biancheng.net/shell/index.html
|
参考链接
http://c.biancheng.net/view/1114.html