手作業でファイルを書き換えた時
オペレーション上ファイルを編集することがありますが、ミスを減らすためのご紹介になります。
dos2unix
$ cat -v node_exporter.yml
- targets:^M
- '<BPNode_IP>:9100'^M
labels:^M
alias: core^M
^M
- targets:^M
- '<RelayNode_IP>:9100'^M
labels:^M
alias: relay1^M
^M
- targets:^M
- 'localhost:9100'^M
labels:^M
alias: relay2^M
$ dos2unix node_exporter.yml
$ cat -v node_exporter.yml
- targets:
- '<BPNode_IP>:9100'
labels:
alias: core
- targets:
- '<RelayNode_IP>:9100'
labels:
alias: relay1
- targets:
- 'localhost:9100'
labels:
alias: relay2Json Validator
sdiff
Last updated