06-12-2012
HTML Code to Run a Script from Remote Unix Host
Hi All,
Noticed few posts around this but coudnt get exatcly what i wanted. Thanks for your help again.
I have a script running on a remote machine and i normally ssh from putty and run the script manually.
Is there anyway that i can write an HTML Code with a button so taht when I Click on a Button it will start the Script.
Can we pass arguments from HTML page? eg:- this Script has a Parameter, i would like to pass that from HTML page..
Did i ask this question in a right forum ?
Regards,
Robin
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How can my unix shell script automatically connect to remote host?
Assume that there is a remote host called "rhost". When I connect to that host i give the command "telnet rhost".
It then asks me for my id and password. Once i give it connects there.
I want to automate these steps. I want... (8 Replies)
Discussion started by: digdarshan
8 Replies
2. Shell Programming and Scripting
I want to write a script which would run from one host say A and connect to other remote host B and then run rest of commands in that host. I tried connecting from A host to B with SSH but after connecting to host B it just getting me inside Host B command prompt. Rest of the script is not running... (6 Replies)
Discussion started by: SN2009
6 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I wish to run a script located on a remote host machineB from machineA.
I am using ssh and running the below on machineA.
However, the ssh does not seem to work and freezes at
ssh -l wlsadmin machineB -v
Sun_SSH_1.1.2, SSH protocols 1.5/2.0, OpenSSL 0x0090704f
debug1: Reading... (9 Replies)
Discussion started by: shifahim
9 Replies
4. Shell Programming and Scripting
I am newbie in Unix and Expect script, so please help me :(
I'm using expect script for remote another host:
#!/usr/bin/expect -f
set timeout 10
spawn ssh -l root 10.120.18.4
expect "password:"
send "password\r"
expect "@"
interact
And now how can i use expect script for access mysql... (2 Replies)
Discussion started by: wormym
2 Replies
5. Shell Programming and Scripting
Hi,
is there a way I can run a shell script through ftp on a remote host? The remote host doesn't have ssh running so I can't use ssh. (7 Replies)
Discussion started by: mrskittles99
7 Replies
6. Shell Programming and Scripting
Hi,
Given addresses of 2 remote machines, using a shell script is it possible to
get the state of running processes in "src"
stop all the processes in "src"
exit out of "src"
ssh into "dest"
resume the state of executing processes captured in step 1 in "dest"
Assumption:
"src" is... (3 Replies)
Discussion started by: Saeya Darsan
3 Replies
7. Shell Programming and Scripting
Hi friends,
I have two servers. Server A and B.
I want to run one script on server A by logging in to server B.
Can anyone provide me code for this.? I tried it by using following
ssh username@serverA ./script
Then it prompt me the password. I give correct password of the server A. but it... (7 Replies)
Discussion started by: Nakul_sh
7 Replies
8. Shell Programming and Scripting
Geeks,
Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s).
Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 Replies
9. Shell Programming and Scripting
Hi,
I got most of the script working, last part which does the ssh to remote and execute the command not working.
for SSH in ${HostList}; do
echo ${SSH}
echo ""
SSH2SEND=ssh user@${SSH} curl -v $URL
echo $SSH2SEND
done
error message I am getting ... (5 Replies)
Discussion started by: samnyc
5 Replies
10. Shell Programming and Scripting
I have below command to check for error logs from last 24 hours from the file : /var/log/messages/ The command is working fine on the local host.
sudo awk -F - -vDT="$(date --date="24 hours ago" "+%b %_d %H:%M:%S")" ' DT < $1' /var/log/messages | egrep -i "error|fail"
I want to run the... (8 Replies)
Discussion started by: rahul2662
8 Replies
LEARN ABOUT MOJAVE
html::pullparser
HTML::PullParser(3) User Contributed Perl Documentation HTML::PullParser(3)
NAME
HTML::PullParser - Alternative HTML::Parser interface
SYNOPSIS
use HTML::PullParser;
$p = HTML::PullParser->new(file => "index.html",
start => 'event, tagname, @attr',
end => 'event, tagname',
ignore_elements => [qw(script style)],
) || die "Can't open: $!";
while (my $token = $p->get_token) {
#...do something with $token
}
DESCRIPTION
The HTML::PullParser is an alternative interface to the HTML::Parser class. It basically turns the HTML::Parser inside out. You associate
a file (or any IO::Handle object or string) with the parser at construction time and then repeatedly call $parser->get_token to obtain the
tags and text found in the parsed document.
The following methods are provided:
$p = HTML::PullParser->new( file => $file, %options )
$p = HTML::PullParser->new( doc => $doc, %options )
A "HTML::PullParser" can be made to parse from either a file or a literal document based on whether the "file" or "doc" option is
passed to the parser's constructor.
The "file" passed in can either be a file name or a file handle object. If a file name is passed, and it can't be opened for reading,
then the constructor will return an undefined value and $! will tell you why it failed. Otherwise the argument is taken to be some
object that the "HTML::PullParser" can read() from when it needs more data. The stream will be read() until EOF, but not closed.
A "doc" can be passed plain or as a reference to a scalar. If a reference is passed then the value of this scalar should not be
changed before all tokens have been extracted.
Next the information to be returned for the different token types must be set up. This is done by simply associating an argspec (as
defined in HTML::Parser) with the events you have an interest in. For instance, if you want "start" tokens to be reported as the
string 'S' followed by the tagname and the attributes you might pass an "start"-option like this:
$p = HTML::PullParser->new(
doc => $document_to_parse,
start => '"S", tagname, @attr',
end => '"E", tagname',
);
At last other "HTML::Parser" options, like "ignore_tags", and "unbroken_text", can be passed in. Note that you should not use the
event_h options to set up parser handlers. That would confuse the inner logic of "HTML::PullParser".
$token = $p->get_token
This method will return the next token found in the HTML document, or "undef" at the end of the document. The token is returned as an
array reference. The content of this array match the argspec set up during "HTML::PullParser" construction.
$p->unget_token( @tokens )
If you find out you have read too many tokens you can push them back, so that they are returned again the next time $p->get_token is
called.
EXAMPLES
The 'eg/hform' script shows how we might parse the form section of HTML::Documents using HTML::PullParser.
SEE ALSO
HTML::Parser, HTML::TokeParser
COPYRIGHT
Copyright 1998-2001 Gisle Aas.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.18.2 2013-03-25 HTML::PullParser(3)