title: How to write a string in a file using vim editor from command line
body: <p>I want to create a new file using vi editor from command line and add a string to it multiple times say 100. Using <code>vi -S command.script file.txt</code> is supposed to do the trick where a new file file.txt will be created and the commands given in command.script file can write to this file. My command.script contains </p>
  
  <pre><code>:%100a hello world 
  :wq
  </code></pre>
  
  <p>But its's not working, what I am doing wrong?</p>