Nov 2, 2002 #1 9anth3r ISP Sep 3, 2002 7 US Just a quick little question, How can i send command line arguemnets to an expect script ex. % ./myescript.exp arg1 arg2 arg3 Any help or links to a how-to's etc etc would be greatly appriciated.
Just a quick little question, How can i send command line arguemnets to an expect script ex. % ./myescript.exp arg1 arg2 arg3 Any help or links to a how-to's etc etc would be greatly appriciated.
Nov 2, 2002 #2 marsd IS-IT--Management Apr 25, 2001 2,218 US Try this: for {set x 0} {$x <= [llength $argv]} {incr x} do_proc [lindex $argv $x] } Upvote 0 Downvote
Nov 4, 2002 #3 ecasadella MIS Oct 11, 2002 57 AD You can try this one too: #!/usr/local/bin/expect -- scan $argv "%s %s %s" var1 var2 var3 send_user "var1: $var1 \n" send_user "var2: $var2 \n" send_user "var3: $var3 \n" EDC Upvote 0 Downvote
You can try this one too: #!/usr/local/bin/expect -- scan $argv "%s %s %s" var1 var2 var3 send_user "var1: $var1 \n" send_user "var2: $var2 \n" send_user "var3: $var3 \n" EDC