Replace one substring for another string in shell script

前端 未结 10 1641
猫巷女王i
猫巷女王i 2020-11-22 11:55

I have \"I love Suzi and Marry\" and I want to change \"Suzi\" to \"Sara\".

#!/bin/bash
firstString=\"I love Suzi and Marry\"
secondString=\"Sara\"
# do some         


        
10条回答
  •  北荒
    北荒 (楼主)
    2020-11-22 12:25

    If tomorrow you decide you don't love Marry either she can be replaced as well:

    today=$( /tmp/lovers.txt
    

    There must be 50 ways to leave your lover.

提交回复
热议问题