【发布时间】:2015-07-10 06:16:36
【问题描述】:
我有一个类似的 database.yml 文件
development:
adapter: mysql2
encoding: utf8
database: d360
host: localhost
username: root
password: password
test:
adapter: mysql2
encoding: utf8
database: sample
host: localhost
username: root
password: password
现在,我想要测试环境数据库的值(即所示 YAML 的 sample)。
我们如何使用 sed 做到这一点?
【问题讨论】:
标签: yaml