03-03-2010
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
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
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
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
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
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
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
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
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
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
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
MPT(4) BSD Kernel Interfaces Manual MPT(4)
NAME
mpt -- LSI Fusion-MPT SCSI/Fibre Channel driver
SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file:
device scbus
device mpt
Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):
mpt_load="YES"
DESCRIPTION
The mpt driver provides support for the LSI Logic Fusion-MPT family of SCSI, Fibre Channel and SAS controllers.
HARDWARE
The following controllers are supported by the mpt driver:
o LSI Logic 53c1030, LSI Logic LSI2x320-X (Single and Dual Ultra320 SCSI)
o LSI Logic AS1064, LSI Logic AS1068 (SAS/SATA)
o LSI Logic FC909 (1Gb/s Fibre Channel)
o LSI Logic FC909A (Dual 1Gb/s Fibre Channel)
o LSI Logic FC919, LSI Logic 7102XP-LC (Single 2Gb/s Fibre Channel)
o LSI Logic FC929, LSI Logic FC929X, LSI Logic 7202XP-LC (Dual 2Gb/s Fibre Channel)
o LSI Logic FC949X (Dual 4Gb/s Fibre Channel)
o LSI Logic FC949E, LSI Logic FC949ES (Dual 4Gb/s Fibre Channel PCI-Express)
The Ultra 320 SCSI controller chips supported by the mpt driver can be found onboard on many systems including:
o Dell PowerEdge 1750 thru 2850
o IBM eServer xSeries 335
These systems also contain Integrated RAID Mirroring and Integrated RAID Mirroring Enhanced which this driver also supports.
The SAS controller chips are also present on many new AMD/Opteron based systems, like the Sun 4100. Note that this controller can drive both
SAS and SATA drives or a mix of them at the same time. The Integrated RAID Mirroring available for these controllers is poorly supported at
best.
The Fibre Channel controller chipset are supported by a broad variety of speeds and systems. The Apple Fibre Channel HBA is in fact the
FC949ES card.
This driver also supports target mode for Fibre Channel cards. This support may be enabled by setting the desired role of the core via the
LSI Logic firmware utility that establishes what roles the card can take on - no separate compilation is required.
SEE ALSO
cd(4), ch(4), da(4), mps(4), pci(4), sa(4), scsi(4), targ(4), gmultipath(8), mptutil(8)
LSI Logic Website, http://www.lsi.com/.
HISTORY
The mpt driver first appeared in FreeBSD 4.6.
AUTHORS
The mpt driver was originally written for FreeBSD by Greg Ansley and marginally improved upon by Matt Jacob <mjacob@FreeBSD.org>.
Justin Gibbs <gibbs@FreeBSD.org> and Scott Long <scottl@FreeBSD.org> have made more substantial improvements.
BSD
July 23, 2011 BSD