Results 1 to 2 of 2
Hi everybody
iam learning tcl/tk scripting language.....
i wrote the code in my linux machime, it is showing exrror like this
bash: ./p1.exp: /usr/bin/expect: bad interpreter: No such file or ...
- 06-05-2007 #1Linux Newbie
- Join Date
- Oct 2006
- Posts
- 107
Tcl/tk
Hi everybody
iam learning tcl/tk scripting language.....
i wrote the code in my linux machime, it is showing exrror like this
bash: ./p1.exp: /usr/bin/expect: bad interpreter: No such file or directory
i start the code like this
#! /usr/bin/expect -f
some code here
and save this file as p1.exp
and last wen i type like ./p1.exp, it shows me like abv error
Can any body tell me and give a simple example program......
thnks in Advance
- 06-05-2007 #2
Here is a simple script that will change a password for a user. The username is given as a command line argument to the script. The password is hard coded.
To use the script it would be something like ./password.tcl username
I figured a few examples of setting variables would help as well.
Code:#!/usr/bin/expect set user [lindex $argv 0] set pass "passw0rd" spawn /usr/bin/passwd $user expect "*password:" send "$pass\r" expect eof


Reply With Quote