Shell - Replace substring in a variable

时间:2020-12-29 11:16:57   收藏:0   阅读:0
scnzzh@zubt1:~/zzh$ str=‘I love python.‘
scnzzh@zubt1:~/zzh$ echo ${str/‘python‘/‘shell‘}
I love shell.

 

评论(0)
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!