title: how to use spawn command in TCL
body: <p>I am using the following code</p>
  
  <pre><code>#!/usr/bin/expect -f
  #!usr/bin/expect
  #package require Expect
  
  
  puts "Hello world"
  
  
  spawn ssh xyz@172.31.112.182
  expect -nocase "password:"
  send "abc123\r"
  
  puts "done"
  </code></pre>
  
  <p>while executing, it throws error</p>
  
  <pre><code>Hello world
  invalid command name "spawn"
      while executing
  "spawn ssh xyz@172.31.112.182"
      (file "temp.tcl" line 9)
  </code></pre>
  
  <p>whats the wrong in my code</p>