title: Using nano in expect scripts
body: <p>I am trying to commit to a repository using expect script but when I do commit, nano editor opens and I am not able to control it using the expect script. The code snippet is as follows :</p>
  
  <pre><code>spawn sudo svn commit e
  
  expect "password for yesha"
  
  send "1234\r"
  </code></pre>
  
  <p>Now a nano editor opens and I need to save the file using the script only. I tried </p>
  
  <pre><code>send "\030"
  </code></pre>
  
  <p>It is the octal code for control X. But it shows the following error </p>
  
  <p>send: spawn id exp7 not open
      while executing
  "send "\030""
      (file "/home/yesha/Desktop/metadata/scripts/addCommit.exp" line 20)</p>
  
  <p>How to resolve this error ?</p>