title: Text replace in a file, on 5h line, from position 18 to position 145
body: <p>I have this text file:</p>
  
  <pre><code>{
      "name": "",
      "auth": true,
      "username": "rtorrent",
      "password": "d5275b68305438499f9660b38980d6cef7ea97001efe873328de1d76838bc5bd15c99df8b432ba6fdcacbff82e3f3c4829d34589cf43236468d0d0b0a3500c1e"
  }
  </code></pre>
  
  <p>Now, I want to be able to replace the <strong>d5275b68305438499f9660b38980d6cef7ea97001efe873328de1d76838bc5bd15c99df8b432ba6fdcacbff82e3f3c4829d34589cf43236468d0d0b0a3500c1e</strong> using sed for example. (The string has always the exact same length, but the values can be different)</p>
  
  <p>I've tried this using <strong>sed</strong>:</p>
  
  <pre><code>sed -i 5s/./new-string/18 file.json
  </code></pre>
  
  <p>That basically replaces text, on the 5th line, starting with position 18. I want to be able to replace the text, exactly starting with position 18 and up to position 154, strictly what's inside the <code>""</code>. The command above will cut the <code>",</code> at the end of the file and if it's run multiple times, the string becomes every time longer and longer.</p>
  
  <p>Any help is really appreciated.</p>