Sponsored Content
Full Discussion: Problem with expect script
Top Forums Shell Programming and Scripting Problem with expect script Post 302750457 by sagar_1986 on Tuesday 1st of January 2013 06:26:37 AM
Old 01-01-2013
Display Problem with expect script

Code:
expect {
        -re "(.*)NEXT PAGE(.*)" {
        send "\r\n"
        }
        exp_continue

Quote:
i just want to put for loop in this code i.e. till the time i am getting reply like NEXT PAGE i want to send "\r\n"
but i don't know how to do that and i want to get this output into a text file

present condition is that the script is executing properly (without for loop) but its not showing any output in text file

Thanks in advance friends and "HAPPY NEW YEAR "


PLz help me dear friends

Last edited by sagar_1986; 01-05-2013 at 02:03 AM.. Reason: reply awaited
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Expect script problem

Hello all you scripting Gurus, I have an expect script that gets called from an AppleScript Studio app that basically takes arguments for user name, password, and server address and then calls rsync. Everything works wonderfully, EXCEPT (there had to be one of those) if the user name starts... (4 Replies)
Discussion started by: jdyck
4 Replies

2. AIX

Problem with expect.

Hi, I am facing a strange problem while executing a script from a solaris server. This script calls another one to execute "expect" commands on some other 40 servers (all AIX 5200). I am passing username and password to the "expect" script as arguments. My problem is that it is showing the... (4 Replies)
Discussion started by: gsabarinath
4 Replies

3. Shell Programming and Scripting

strange expect script behavior, or am i misunderstanding expect scripting?

Hello to all...this is my first post (so please go easy). :) I feel pretty solid at expect scripting, but I'm running into an issue that I'm not able to wrap my head around. I wrote a script that is a little advanced for logging into a remote Linux machine and changing text in a file using sed.... (2 Replies)
Discussion started by: v1k0d3n
2 Replies

4. Shell Programming and Scripting

Problem in expect script with password involving trailing backslash

Hi all, I have wriiten an expect script that genearates a public private key pair through ssh-keygen and then copies that key to the authorized keys file of the remote system . The problem i am facing is when i get a password for the remote machine containg a trailing backslash , the send command... (4 Replies)
Discussion started by: pradeeptyagi23
4 Replies

5. 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

6. Shell Programming and Scripting

expect problem

hi all, guys i have a problem in this code... any help ? #!/usr/bin/expect if { $argc != 3 } { puts "Usage:" puts "$argv0 username oldpwd newpwd" exit } #set machine set username set oldpwd set newpwd set completed_list " " (2 Replies)
Discussion started by: b1sh0p
2 Replies

7. Shell Programming and Scripting

expect script problem

Hi, Have strange problem. When I run an expect script towards a switch, it will not work. $ ./test2 spawn ssh admin@sesafdd101 Password: Last login: Thu Dec 25 13:20:54 2008 from 172.20.96.14 ECN430/330/212 Linux, based on Wind River Linux glibc_small (standard) 2.0 Trying... (1 Reply)
Discussion started by: etxnreg
1 Replies

8. 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

9. 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

10. 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
PSSET(1)								FSF								  PSSET(1)

NAME
psmandup - insert page device request in PostScript files SYNOPSIS
psset FILE DESCRIPTION
Produce a version of the PostScript FILE with a protected call to the PostScript operator `setpagedevice'. Typical use is making FILE print duplex, or on the manual tray etc. OPTIONS
-h, --help display this help and exit -v, --version display version information and exit -q, --quiet don't print informational messages -o, --output=FILE save result in FILE. If FILE is `-', send to stdout -n, --no-fix don't run `fixps' to fix PS problems in FILE -S, --setpagedevice=KEY[:VALUE] pass a page device definition to output. Multiple values accumulate -a, --at=PAGE insert the page device definitions at PAGE. Default is PAGE=0, standing for the Document's Setup section Shortcuts: -m, --manualfeed alias for -SManualFeed:true -s, --simplex alias for -SDuplex:false -d, --duplex alias for -SDuplex:true -STumble:false corresponds to Duplex, binding along the long edge -t, --tumble alias for -SDuplex:true -STumble:true corresponds to Duplex, binding along the short edge Produced output is meant for PS level 2 printers. News, updates and documentation: visit http://www.inf.enst.fr/~demaille/a2ps/ AUTHOR
Written by Akim Demaille. REPORTING BUGS
Report bugs to <bug-a2ps@gnu.org> COPYRIGHT
Copyright (C) 1998-1999 Akim Demaille, Miguel Santana This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. SEE ALSO
a2ps(1), card(1), fixps(1), pdiff(1), psset(1), texi2dvi4a2ps(1). The full documentation for psset is maintained as a Texinfo manual. If the info and psset programs are properly installed at your site, the command info psset should give you access to the complete manual. psset 1.3 (GNU a2ps 4.13) February 2000 PSSET(1)
All times are GMT -4. The time now is 04:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy