我在 RoR 项目的 config/application.rb 文件中有以下几行:
[other lines that i omitted here]
config.app_type= :rewards # :classic / :rewards
config.app_prefix= '' # '$ ' for :classic / '' for :rewards
config.app_suffix= ' pts' # ' MXN', ' USD' for :classic / ' pts' for :rewards
我想用 sed 的脚本将文本更改为:
[other lines that i omitted here]
config.app_type= :classic # :classic / :rewards
config.app_prefix= '$ ' # '$ ' for :classic / '' for :rewards
config.app_suffix= ' USD' # ' MXN', ' USD' for :classic / ' pts' for :rewards
我怎么能用 sed 做到这一点?,我仍然没有用正则表达式和 sed 得到它......:S