title: How can I add x number of leading spaces in a string using Bash?
body: <p><code>x</code> contains the number of characters to add. How can I add <code>$x</code> number of characters to a text line?</p>
  <pre><code>sed -i s/^/   /
  </code></pre>
  <p><code>sed</code> does the job, but the number of spaces must be typed. In my case, the number of spaces is in a calculated variable.</p>