title: expect returning error "Option requires an argument" when argument given
body: <p>I have this code:</p>
  
  <pre><code>#!/bin/sh
  if [ "upload" == $1 ];then
  expect -c &lt;&lt;'END_EXPECT'
  set timeout -1
  spawn sftp -i /Users/myuser/.ssh/private.key root@dev.site.org
  expect "sftp&gt;"
  send "put dirname $0/$2/$3 /var/www/localhost/htdocs/dev1.site.org/$2/$3\r"
  expect "%100"
  send "quit\r"
  expect eof
  END_EXPECT
  elif [ 'download' == $1 ];then
  expect -c &lt;&lt;'END_EXPECT'
  set timeout -1
  spawn sftp login_name@1.2.3.4
  expect "[Pp]assword:"
  send "login_password\r"
  expect "sftp&gt;"
  send "get /remote_path/$2/$3 dirname $0/$2/$3 \r"
  expect "%100"
  send "quit\r"
  expect eof
  END_EXPECT
  fi
  </code></pre>
  
  <p>However, it is throwing this error:</p>
  
  <pre><code>expect: option requires an argument -- c
  usage: expect [-div] [-c cmds] [[-f] cmdfile] [args]
  </code></pre>
  
  <p>I'm in OSX 10.9. Why it is not working? I've never used expect in the past...</p>