shell脚本拼接变量
时间: 2023-08-28 15:23:20 浏览: 190
shell 脚本
在shell脚本中,我们可以使用变量拼接字符串。有几种方法可以实现字符串的拼接。
1. 使用`${变量名}`来拼接字符串。例如,`${var1}world`会将变量`var1`和字符串`world`拼接在一起。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [[100 tips about shell] shell中变量拼接输出字符串、单引号、双引号](https://blog.csdn.net/kouryoushine/article/details/121580308)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [Linux Shell脚本字符串变量拼接与赋值总结](https://blog.csdn.net/sodalife/article/details/110673401)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文