Sponsored Content
Top Forums Shell Programming and Scripting strange expect script behavior, or am i misunderstanding expect scripting? Post 302266584 by v1k0d3n on Wednesday 10th of December 2008 03:31:56 PM
Old 12-10-2008
Error

Quote:
Originally Posted by Perderabo
You probably have a bug somewhere else.
Sure nuf...this is a bug. For future ref, here is the system OS and version numbers:

SUSE LINUX 11.0
Linux HOSTNAME 2.6.25.18-0.2-pae #1 SMP 2008-10-21 16:30:26 +0200 i686 i686 i386 GNU/Linux
expect version 5.44.1.5
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Misunderstanding of sort behavior

Hi everyone, I use the sort from the 5.3.0 coreutils package. I have a file consisting in 5 fields separated by a single space, with no leading or trailing blanks. I want to sort it first according to the 4th field, which contains integers (some of them negative), and secondly on the second... (2 Replies)
Discussion started by: chlorine
2 Replies

2. UNIX for Dummies Questions & Answers

Strange expect problem

Hi I'm writing a script which calls an expect script to retrieve configuration files for network devices. I want to avoid using TFTP to transfer the configs if possible and so I'm redirecting the screen output to a text file. This is the expect script: #!/usr/local/bin/expect set... (2 Replies)
Discussion started by: Ant1815
2 Replies

3. Shell Programming and Scripting

Expect Scripting Help

Hi All, I am trying to connect a router using Expect scripting. But my script shows error.One more thing after the command telnet localhost 2000 we should press ENTER KEY once before the command prompt asks for "enable" and password.Please help correctiong my script. #!/usr/bin/expect -- ... (2 Replies)
Discussion started by: Harikrishna
2 Replies

4. Shell Programming and Scripting

Need help with Expect script for Cisco IPS Sensors, Expect sleep and quoting

This Expect script provides expect with a list of IP addresses to Cisco IPS sensors and commands to configure Cisco IPS sensors. The user, password, IP addresses, prompt regex, etc. have been anonymized. In general this script will log into the sensors and send commands successfully but there are... (1 Reply)
Discussion started by: genewolfe
1 Replies

5. Shell Programming and Scripting

Expect script strange behaviour

Hi people, I'm having some strange behaviour with an 'expect' script. spawn csession blah expect "Username: " send "userblah\r" expect "Password: " send "passwordblah\r" interact When I execute the script as root it runs perfectly. However, when executed as any other... (0 Replies)
Discussion started by: GarciasMuffin
0 Replies

6. Programming

Calling expect script inside another expect

Hi, Am very new to expect scripting.. Can You please suggest me how to call an expect script inside another expect script.. I tried with spawn /usr/bin/ksh send "expect main.exp\r" expect $root_prompt and spawn /usr/bin/ksh send "main.exp\r" expect $root_prompt Both... (1 Reply)
Discussion started by: Priya Amaresh
1 Replies

7. Programming

Calling another expect script inside an expect script

I have an expect script called remote that I want to call from inside my expect script called sudoers.push, here is the code that is causing me issues: set REMOTE "/root/scripts/remote" ... log_user 1 send_user "Executing remote script as $user...\n" send_user "Command to execute is: $REMOTE... (1 Reply)
Discussion started by: brettski
1 Replies

8. IP Networking

IP and expect scripting

Hi I am new to IP configuration and using expect script I have a requirement like I need to write a expect script that can ssh to a remote machine(linux1) using password which already has IP, once logged inside machine need to reboot remote machine(linux1) and again login to same remote... (1 Reply)
Discussion started by: Priya Amaresh
1 Replies

9. Programming

Expect script returning string following a found expect.

I'm fairly new to scripting so this might not be possible. I am using Expect with Cisco switches and need to capture the string after finding the expect request. For example, when I issue "show version" on a Nexus switch, I'm looking to capture the current firmware version: #show version ... (0 Replies)
Discussion started by: IBGaryA
0 Replies

10. UNIX for Beginners Questions & Answers

Expect scripting issue, works interactively when doing commands in cli, does not work in script

Hi; problem may be obvious, simple but I have to say it is somehow not easy to locate the issue. I am doing some word extracting from multiline text. Interacting in CLI seems to work without issues. First step is to add multiline text to a variable. expect1.1> expect1.1> set... (2 Replies)
Discussion started by: aldowski
2 Replies
PMINST(1p)						User Contributed Perl Documentation						PMINST(1p)

NAME
pminst - find modules whose names match this pattern SYNOPSIS
pminst [-s] [-l] [pattern] DESCRIPTION
Without argumnets, show the names of all installed modules. Given a pattern, show all module names that match it. The -l flag will show the full pathname. The -s flag will separate the base directory from @INC from the module portion itself. EXAMPLES
$ pminst (lists all installed modules) $ pminst Carp CGI::Carp Carp $ pminst ^IO:: IO::Socket::INET IO::Socket::UNIX IO::Select IO::Socket IO::Poll IO::Handle IO::Pipe IO::Seekable IO::Dir IO::File $ pminst '(?i)io' IO::Socket::INET IO::Socket::UNIX IO::Select IO::Socket IO::Poll IO::Handle IO::Pipe IO::Seekable IO::Dir IO::File IO Pod::Functions The -s flag provides output with the directory separated by a space: $ pminst -s | sort +1 (lists all modules, sorted by name, but with where they came from) $ oldperl -S pminst -s IO /usr/lib/perl5/i386-linux/5.00404 IO::File /usr/lib/perl5/i386-linux/5.00404 IO::Handle /usr/lib/perl5/i386-linux/5.00404 IO::Pipe /usr/lib/perl5/i386-linux/5.00404 IO::Seekable /usr/lib/perl5/i386-linux/5.00404 IO::Select /usr/lib/perl5/i386-linux/5.00404 IO::Socket /usr/lib/perl5/i386-linux/5.00404 IO /usr/lib/perl5/site_perl LWP::IO /usr/lib/perl5/site_perl LWP::TkIO /usr/lib/perl5/site_perl Tk::HTML::IO /usr/lib/perl5/site_perl Tk::IO /usr/lib/perl5/site_perl IO::Stringy /usr/lib/perl5/site_perl IO::Wrap /usr/lib/perl5/site_perl IO::ScalarArray /usr/lib/perl5/site_perl IO::Scalar /usr/lib/perl5/site_perl IO::Lines /usr/lib/perl5/site_perl IO::WrapTie /usr/lib/perl5/site_perl IO::AtomicFile The -l flag gives full paths: $ filsperl -S pminst -l Thread /usr/local/filsperl/lib/5.00554/i686-linux-thread/Thread/Queue.pm /usr/local/filsperl/lib/5.00554/i686-linux-thread/Thread/Semaphore.pm /usr/local/filsperl/lib/5.00554/i686-linux-thread/Thread/Signal.pm /usr/local/filsperl/lib/5.00554/i686-linux-thread/Thread/Specific.pm /usr/local/filsperl/lib/5.00554/i686-linux-thread/Thread.pm AUTHORS and COPYRIGHTS Copyright (C) 1999 Tom Christiansen. Copyright (C) 2006-2008 Mark Leighton Fisher. This is free software; you can redistribute it and/or modify it under the terms of either: (a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or (b) the Perl "Artistic License". (This is the Perl 5 licensing scheme.) Please note this is a change from the original pmtools-1.00 (still available on CPAN), as pmtools-1.00 were licensed only under the Perl "Artistic License". perl v5.10.1 2010-02-22 PMINST(1p)
All times are GMT -4. The time now is 07:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy