📜  bash 替换字符串中的子字符串 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:40.686000             🧑  作者: Mango

代码示例2
#!/bin/bash
firstString="I love Suzi and Marry"
secondString="Sara"
echo "${firstString/Suzi/$secondString}"    
# prints 'I love Sara and Marry'