title: Bash format string. Substitute placeholders with values.
body: <p>I would like to format string using linux bash:</p>
  
  <pre><code>"&lt;username&gt;{0}&lt;/username&gt;&lt;password&gt;{1}&lt;/password&gt;".format("user", "pass")
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>&lt;username&gt;user&lt;/username&gt;&lt;password&gt;pass&lt;/password&gt;
  </code></pre>
  
  <p>What is the correct command to do this? I can use any other wildcard instead <code>{0}</code> and <code>{1}</code> </p>