I need help in making my script run perfectly as expected.
This is a snippet from my script. I am trying to read the ";" from the below output using the expect command, but the command is not detecting it. Could you please help me correct the expect string?
Snippet:
----
---
Output(below is the semi-colon expect command should have detected and stopped):
----------
Thanks in anticipation of your help!
Moderator's Comments:
Please view this code tag video for how to use code tags when posting code and data.
I need to run a remote application(GUI) in a client.i.e on running a script in the client machine i should get the GUI application which is running in the server by providing password through the script.Will expect or autoexpect command suit for this scenario?
could anyone help me by posting some... (0 Replies)
Hello,
I am doing a project which asks me to enter password 4 times in a row. I need to enter the same password 4 times. My target is to enter password once and apply it 4 times.
My friend told me to use "expect" command. Can you please give me a sample code to do so.
sample command :- $ ssh... (1 Reply)
Hello Expect experts,
Is it possible with Expect to run a command first when an expected phrase is
outputted by a spawned program? Before sending an answer to the spawned program that is...
Thanks a lot. (2 Replies)
Hi ,
I just wondering if there is any command that works similar to the expect command. I'm trying to setup a korn shell script that goes to remote servers and executes a command likes :
su - username -c "script to execute "
but then it'll prompt for the password so if I can provide... (1 Reply)
Hello
I am trying su from one user to another in a script. Now the person who runs the script(user) cannot have the password for the user he is su -ing to (webuser) .
Here is my script which performs su . This is a hack job based on a few hours of web search.
#!/usr/local/bin/expect
set... (5 Replies)
Hi,
10.152.165.217 and 10.152.165.218 are two servers that i use. I would like to access 218 from 217 using expect command. i'm not aware of how to use the command. Could anyone help me with it with a script snippet
-> imagine abc be the user in 217 with passwd abc123
-> imagine xyz be... (1 Reply)
Hi,
I am using following commands in my script to send a password to scp command. Everything is working fine except that I need a return code from the scp command. Do any one have an idea how to receive the exit code of scp command from expect.
/usr/bin/expect << EOF
spawn -noecho scp -pq... (0 Replies)
Hi, I wanted to automate the scp command where i do not want to enter the password each time. So thought of using expect command. Script is executing without any issues but files are not copied to remote server. Can any one help me?
Below is my shell script..
#!/bin/ksh
... (1 Reply)
Hi folks,
Im having trouble with an expect command in a shell script I use to back up mac os x servers. This one is being run on a 10.8.2 Server as part of a larger bash script. The script executes perfectly all the way through when triggered on the command line, but when launchd triggers it at... (4 Replies)
Discussion started by: rowie718
4 Replies
LEARN ABOUT OSX
tap::parser::sourcehandler::file
TAP::Parser::SourceHandler::File(3pm) Perl Programmers Reference Guide TAP::Parser::SourceHandler::File(3pm)NAME
TAP::Parser::SourceHandler::File - Stream TAP from a text file.
VERSION
Version 3.23
SYNOPSIS
use TAP::Parser::Source;
use TAP::Parser::SourceHandler::File;
my $source = TAP::Parser::Source->new->raw( 'file.tap' );
$source->assemble_meta;
my $class = 'TAP::Parser::SourceHandler::File';
my $vote = $class->can_handle( $source );
my $iter = $class->make_iterator( $source );
DESCRIPTION
This is a raw TAP stored in a file TAP::Parser::SourceHandler - it has 2 jobs:
1. Figure out if the raw source it's given is a file containing raw TAP output. See TAP::Parser::IteratorFactory for more details.
2. Takes raw TAP from the text file given, and converts into an iterator.
Unless you're writing a plugin or subclassing TAP::Parser, you probably won't need to use this module directly.
METHODS
Class Methods
"can_handle"
my $vote = $class->can_handle( $source );
Only votes if $source looks like a regular file. Casts the following votes:
0.9 if it's a .tap file
0.9 if it has an extension matching any given in user config.
"make_iterator"
my $iterator = $class->make_iterator( $source );
Returns a new TAP::Parser::Iterator::Stream for the source. "croak"s on error.
"iterator_class"
The class of iterator to use, override if you're sub-classing. Defaults to TAP::Parser::Iterator::Stream.
CONFIGURATION
{
extensions => [ @case_insensitive_exts_to_match ]
}
SUBCLASSING
Please see "SUBCLASSING" in TAP::Parser for a subclassing overview.
SEE ALSO
TAP::Object, TAP::Parser, TAP::Parser::SourceHandler, TAP::Parser::SourceHandler::Executable, TAP::Parser::SourceHandler::Perl,
TAP::Parser::SourceHandler::Handle, TAP::Parser::SourceHandler::RawTAP
perl v5.16.2 2012-10-25 TAP::Parser::SourceHandler::File(3pm)