# 手作業でファイルを書き換えた時

ノードはLinuxなのに対して、作業端末にWindowsを使用しているため改行コードが混ざる事があります。

#### dos2unix

dos2unixはLinux環境の改行コードへ変換します。別途、`sudo apt install 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: relay2
```

#### Json Validator

`mainnet-topology.json`などコンフィグファイルはjson形式になっています。編集をした時、フォーマットが間違っているとエラーになります。<https://jsonlint.com/> などのサイトではフォーマットのチェックをかける事ができます。**\* 秘密鍵をペーストすることなどは厳禁でお願いします。**

#### **sdiff**

ファイルを書き換えた時や、新旧バージョンのファイルでどこに変更があったかを比較する事ができます。

```
$ sdiff params.json cardano-node/protocol.json 

{                                                               {
    "poolDeposit": 500000000,                                       "poolDeposit": 500000000,
    "protocolVersion": {                                            "protocolVersion": {
        "minor": 0,                                                     "minor": 0,
        "major": 3                                            |         "major": 2
    },                                                              },
    "minUTxOValue": 1000000,                                        "minUTxOValue": 1000000,
    "decentralisationParam": 0.3,                             |     "decentralisationParam": 1,
    "maxTxSize": 16384,                                             "maxTxSize": 16384,
    "minPoolCost": 340000000,                                       "minPoolCost": 340000000,
    "minFeeA": 44,                                                  "minFeeA": 44,
    "maxBlockBodySize": 65536,                                      "maxBlockBodySize": 65536,
    "minFeeB": 155381,                                              "minFeeB": 155381,
    "eMax": 18,                                                     "eMax": 18,
    "extraEntropy": {                                               "extraEntropy": {
        "tag": "NeutralNonce"                                           "tag": "NeutralNonce"
    },                                                              },
    "maxBlockHeaderSize": 1100,                                     "maxBlockHeaderSize": 1100,
    "keyDeposit": 2000000,                                          "keyDeposit": 2000000,
    "nOpt": 500,                                              |     "nOpt": 150,
    "rho": 3.0e-3,                                                  "rho": 3.0e-3,
    "tau": 0.2,                                                     "tau": 0.2,
    "a0": 0.3                                                       "a0": 0.3
}                                                               }
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sugar-stake-pool.gitbook.io/cardano-kb/cardano-node-operation/no.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
