This is a discussion on Expect and tcl - manymaint.exp script within the Shell scripting forums, part of the Development/Scripting category; Hello everyone, i've been searching for close to a week now on this issue with so far no luck. I'm ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
Hello everyone, i've been searching for close to a week now on this issue with so far no luck. I'm really at a dead end of where to go from here. This is my issue.
I have a fresh install of Fedora 6 with expect and tcl installed by doing the following: yum install tcl yum install expect Code:
[root@intelligen Routerscript]# autoexpect manymaint.exp
autoexpect started, file is script.exp
couldn't execute "manymaint.exp": no such file or directory
while executing
"spawn -noecho manymaint.exp"
("eval" body line 1)
invoked from within
"eval spawn -noecho $argv"
invoked from within
"if {[llength $argv]>0} {
eval spawn -noecho $argv
cmd "spawn $argv"
} else {
spawn -noecho $env(SHELL)
cmd "spawn \$env(SHELL)"
}"
(file "/usr/bin/autoexpect" line 315)
Code:
[root@intelligen Routerscript]# expect ./manymaint.exp
invalid .command .name "savescript="y""
while execudting
"savescript="y""
(file "./manymaint.exp" line 19)
(I would post the remaining question but the forum says I must have 5 posts before you can post URL's/Links but i'm not posting anything like that. Can a mod help me out?) |
| Sponsored Links | ||
|
|
|
|||
|
I chmod the script yesterday and i believe i have correct rights on it now:
Code:
-rwxr-xr-x 1 root root 8672 Dec 12 20:38 manymaint.exp Here is the output Code:
[root@intelligen Routerscript]# head -1 ./manymaint.exp #!/bin/sh |
|
||||
|
This is => http://expect.nist.gov/scripts/manymaint shell script and not expect script. Following output Line clearly indicates that this is a shell script:
Code:
#!/bin/sh Code:
chmod +x manymaint ./manymaint Code:
file manymaint |
|
|||
|
I apologize, my linux knowledge is very low. More of a windows administrator.
I am using Fedora 6. I tried to type out what i was doing in first post but it kept saying i needed 5 posts or more. Weird! What i'm trying to do change 300 router SNMP private and public strings. We used the manymaint script before which generates a script.exp script. So when i download manymaint its a .txt, what SHOULD i be renaming it too? |
|
|||
|
I've did the chmod and rights look as follows:
Code:
-rwxr-xr-x 1 root root 8672 Dec 12 20:38 manymaint Code:
[root@intelligen Routerscript]# ./manymaint Code:
[root@intelligen Routerscript]# ./manymaint bash: ./manymaint: /bin/sh^M: bad interpreter: No such file or directory |
|
|||
|
Yup, i just need to keep with it. I need to install it as my main OS to force me to figure things out.
Ok when creating the symbolic link i get this: Code:
[root@intelligen Routerscript]# ln -s /bin/bash /bin/sh ln: creating symbolic link `/bin/sh' to `/bin/bash': File exists Quote:
|
|
|||
|
I think i figured it out. Since i had edited in notepad on a windows system the file was reading incorrectly as found when i searched on google.
This is what it said: Quote:
Code:
vim set ff=unix [/quote] |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| expect about helps pls | samuel | Shell scripting | 0 | 03-05-2008 01:05 PM |
| interacting with expect | monteo7 | Shell scripting | 1 | 03-04-2008 05:42 PM |