title: How can I get kermit script to accept arguments and connect to serial device
body: <p>I wrote the following in a <code>kermit</code> script to connect to my serial device:</p>
  
  <pre><code>#!/usr/bin/env kermit
  set port /dev/ttyUSB8
  set speed 115200
  set carrier-watch off
  set flow-control none
  set prefixing all
  set input echo on
  </code></pre>
  
  <p>It does the job pretty well. Now, I want to make this a generic script and would like to take the input from the user which port he wants to connect. So, I thought taking input as a commandline argument is the best way to do. And I modified the above in the following way:</p>
  
  <pre><code>#!/usr/bin/env kermit
  port_num="/dev/ttyUSB"+$1
  set port port_num
  set speed 115200
  set carrier-watch off
  set flow-control none
  set prefixing all
  set input echo on
  </code></pre>
  
  <p>But, I get the following error:</p>
  
  <pre><code>user4@user-pc-4:~/Scripts$ ./test.script 8
  ?Not a command or macro name: "port_num="/dev/ttyUSB$1""
  File: /home/Scripts/test.script, Line: 2
  port_num
  ?SET SPEED has no effect without prior SET LINE
  "8" - invalid command-line option, type "kermit -h" for help
  </code></pre>
  
  <p>I tried replacing </p>
  
  <pre><code>port_num="/dev/ttyUSB"+$1
  </code></pre>
  
  <p>with</p>
  
  <pre><code>port_num="/dev/ttyUSB$1"
  </code></pre>
  
  <p>as well.</p>
  
  <p>There is an obvious flaw in my second script. How can I get the script to accept the user input and connect to the serial port using <code>kermit</code>?</p>