Sponsored Content
Top Forums Shell Programming and Scripting Expect Script square bracket dollar prompt Post 302400628 by Ikaro0 on Wednesday 3rd of March 2010 05:59:04 PM
Old 03-03-2010
Network Expect Script square bracket dollar prompt

Hi

Thanks for this amazing forum first, I've been searching answers in it for problems that I've encountered at work.

The only problem I haven't been able to find a fix for, is a ever waiting for prompt problem in Expect when encounter a [whatever]$ prompt.

I usually set the timeout to -1 cause the script runs faster if every string I wrote at it match's but I have problems with the prompt referred above.

Id tried to "set mpt "\$" and then expect -- "$mpt" or
"set mpt "\]\$" or simple "expect -- *\]\$?]" and non of them worked.

Does anyone had similar problems?

Thanks in advance for any help.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extract string in square bracket

Hi Input text is some message some message some message Expected output is main value1 value2 value3 Any idea how to above values in square brackets using shell scripting? many thanks. (3 Replies)
Discussion started by: hnh
3 Replies

2. Shell Programming and Scripting

Expect, save to file and remove before prompt

I have an Expect script which works very well. It logs into my remote routers and runs some commands and then to the next until finished. I need two things, first I need to save the output to a file from where the log_user 1 begins. expect << EOF set timeout 15 #set var "exit " match_max... (1 Reply)
Discussion started by: numele
1 Replies

3. Shell Programming and Scripting

Group on the basis of common text in the square bracket and sorting

File A 99 >ac >ss >juk 70 >acb >defa 90 >ca 100 >aa >abc >bca 85 >cde 81 >ghi >ghij 87 >def >fgh <ijk 89 >fck >ghij >kill >aa The given output shud be 100 >aa >abc >bca 87 >def >fgh <ijk 89 >fck >ghij >kill >aa (2 Replies)
Discussion started by: cdfd123
2 Replies

4. Shell Programming and Scripting

Handling SQL prompt through Perl expect module

Hi All, I have a doubt whether expect module in perl will work in SQL prompt or its applicable only for shell prompt ? Thanks, Arun V (2 Replies)
Discussion started by: arun_maffy
2 Replies

5. Shell Programming and Scripting

ksh, difference between double bracket and single bracket

Can somebody tell me the difference between double brackets and single brackets, when doing a test. I have always been acustomed to using single brackets and have not encountered any issues to date. Why would somebody use double brackets. Ie if ] vs if Thanks to... (2 Replies)
Discussion started by: BeefStu
2 Replies

6. Shell Programming and Scripting

Expect doesn't recognize a password prompt

Hi. Here is beginning of my script #!/usr/local/bin/expect -- set timeout 15 spawn /usr/local/account.sh -n modify expect "Password:" {send "mypassword\r"} But due to some terminal control sequences (or something else, dunno exactly) my password prompt is looking like this: and expect... (3 Replies)
Discussion started by: urello
3 Replies

7. Shell Programming and Scripting

Doubt with regex to replace square bracket

there is a word "welcome" output should be "welcome\ i am using regsub to add backslash "\" in place where ever i find square brackets (open or close).. But i am not getting it... pls help out.. set a {welcome} set d (5 Replies)
Discussion started by: Syed Imran
5 Replies

8. Shell Programming and Scripting

Expect prompt extending to next line

Hi guys, I am trying to install a software which is a shell script. I am using expect to do the silent installation. There is a strange line during the installation of the software like this below. The prompt goes to the next line. ENTER AN ABSOLUTE PATH, OR PRESS <ENTER> TO ACCEPT THE... (0 Replies)
Discussion started by: kapkap
0 Replies

9. Shell Programming and Scripting

Expect script not expecting the password prompt

I have a script that does an SSH into a remote node. It should expect the prompt and send the password. #!/usr/bin/expect set user ; set pass ; spawn ssh $user@E-Internal expect { -re "RSA key fingerprint" {send "yes\r"} timeout... (1 Reply)
Discussion started by: Junaid Subhani
1 Replies

10. Shell Programming and Scripting

Dollar symbol in Shell Script Variable

Hi, I am working on PGP encryption. I am getting public keys from some file. One of the key has dollar sign in it "$" Example: "abc$123" echo 'passphrase='$passphrase --> Giving correct value abc$123 But if I use $passphrase in PGP command getting Invalid passphrase error. If I... (10 Replies)
Discussion started by: Sreehari
10 Replies
PPIx::Regexp::Constant(3)				User Contributed Perl Documentation				 PPIx::Regexp::Constant(3)

NAME
PPIx::Regexp::Constant - Constants for the PPIx::Regexp system SYNOPSIS
use PPIx::Regexp::Constant qw{ TOKEN_UNKNOWN } print "An unknown token's class is TOKEN_UNKNOWN "; INHERITANCE
"PPIx::Regexp::Constant" is an Exporter. "PPIx::Regexp::Constant" has no descendants. DETAILS
This module defines manifest constants for use by the various "PPIx::Regexp" modules. These constants are to be considered private to the "PPIx::Regexp" system, and the author reserves the right to change them without notice. This module exports the following manifest constants: COOKIE_CLASS The name of the cookie used to control the construction of character classes. This cookie is set in PPIx::Regexp::Token::Structure when the left square bracket is encountered, and cleared in the same module when a right square bracket is encountered. COOKIE_QUANT The name of the cookie used to control the construction of curly bracketed quantifiers. This cookie is set in PPIx::Regexp::Token::Structure when a left curly bracket is encountered. It requests itself to be cleared on encountering anything other than a literal comma, a literal digit, or an interpolation, or if more than one comma is encountered. If it survives until PPIx::Regexp::Token::Structure processes the right curly bracket, it is cleared there. COOKIE_QUOTE The name of the cookie used to control the parsing of "Q ... E" quoted literals. This cookie is set in PPIx::Regexp::Token::Control when a "Q" is encountered, and it persists until the next "E". COOKIE_REGEX_SET The name of the cookie used to control regular expression sets. MINIMUM_PERL The minimum version of Perl understood by this parser, as a float. It is currently set to 5.000, since that is the minimum version of Perl accessible to the author. MODIFIER_GROUP_MATCH_SEMANTICS The name of the PPIx::Regexp::Token::Modifier group used to control match semantics. RE_CAPTURE_NAME A string representation of a regular expression that matches the name of a named capture buffer. STRUCTURE_UNKNOWN The name of the class that represents the unknown structure. That is, PPIx::Regexp::Structure::Unknown. TOKEN_LITERAL The name of the class that represents a literal token. That is, PPIx::Regexp::Token::Literal. TOKEN_UNKNOWN The name of the class that represents the unknown token. That is, PPIx::Regexp::Token::Unknown. SUPPORT
Support is by the author. Please file bug reports at <http://rt.cpan.org>, or in electronic mail to the author. AUTHOR
Thomas R. Wyant, III wyant at cpan dot org COPYRIGHT AND LICENSE
Copyright (C) 2009-2013 by Thomas R. Wyant, III This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. perl v5.16.3 2014-06-10 PPIx::Regexp::Constant(3)
All times are GMT -4. The time now is 06:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy