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
LESSECHO(1)						      General Commands Manual						       LESSECHO(1)

NAME
lessecho - expand metacharacters SYNOPSIS
lessecho [-ox] [-cx] [-pn] [-dn] [-mx] [-nn] [-ex] [-a] file ... DESCRIPTION
lessecho is a program that simply echos its arguments on standard output. But any metacharacter in the output is preceded by an "escape" character, which by default is a backslash. OPTIONS
A summary of options is included below. -ex Specifies "x", rather than backslash, to be the escape char for metachars. If x is "-", no escape char is used and arguments con- taining metachars are surrounded by quotes instead. -ox Specifies "x", rather than double-quote, to be the open quote character, which is used if the -e- option is specified. -cx Specifies "x" to be the close quote character. -pn Specifies "n" to be the open quote character, as an integer. -dn Specifies "n" to be the close quote character, as an integer. -mx Specifies "x" to be a metachar. By default, no characters are considered metachars. -nn Specifies "n" to be a metachar, as an integer. -fn Specifies "n" to be the escape char for metachars, as an integer. -a Specifies that all arguments are to be quoted. The default is that only arguments containing metacharacters are quoted SEE ALSO
less(1) AUTHOR
This manual page was written by Thomas Schoepf <schoepf@debian.org>, for the Debian GNU/Linux system (but may be used by others). Send bug reports or comments to bug-less@gnu.org. Version 458: 04 Apr 2013 LESSECHO(1)
All times are GMT -4. The time now is 11:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy