09-27-2017
Thanks Rudic and Bakunin for your inputs!
Actually i am able to read it from file but unable to get it from the query result.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I am trying to write a ftp script which will read a file for filenames and ftp those files to another server. Here's my ftp script, but it's scanning the current directory for file names.
My question is how can I pass multiple files (these files will have the name of data files that need to... (0 Replies)
Discussion started by: sajjad02
0 Replies
2. UNIX for Dummies Questions & Answers
Hello
I am using unix CLI commands for the Synergy CM software. The command basically searches for a folder ID and returns the names of the projects the folder sits in. The result is assigned to a variable:
FIND_USE=`ccm folder -fu -u -f "%name"-"%version" ${FOLDER_ID}`
When the command... (6 Replies)
Discussion started by: Glyn_Mo
6 Replies
3. Shell Programming and Scripting
Hi,
I had written a shell script to pass command line argument to variable in a function.
Here is my code:
main
if ; then
.$1
echo $1
get_input_file
else
echo "input file $1 is not available"
fi
get_input_file()
{
FILE = "$1"
echo $FILE
} (10 Replies)
Discussion started by: Poonamol
10 Replies
4. Shell Programming and Scripting
When I run this:
PDHDURL=`/usr/bin/curl --silent http://www.phdcomics.com/comics.php | /usr/bin/grep -o http://www.phdcomics.com/comics/archive/.*.gif | head -1`
echo -e "$PHDURL"
It is totally blank. However, when I just run it from the terminal:
/usr/bin/curl --silent... (2 Replies)
Discussion started by: killer54291
2 Replies
5. Shell Programming and Scripting
Hello, I am quite new in shell scripting and I would like to write a little scritp to run a program on some parameters files.
all my parameters files are in the same directory, so pick them up with
ls *.para >>dirafter that I have a dir file like that:
param1.para
param2.para
etc...
I... (2 Replies)
Discussion started by: shadok
2 Replies
6. Shell Programming and Scripting
Hi. I'm trying to write a script that reads a line on a file and runs a different command for a different line output.
For example, if it finds the word "Kuku" on the line it sends mail to Kuku@kuku.com. Otherwise, it sends mail to Lulu@lulu.com.
TIA. (2 Replies)
Discussion started by: Doojek9
2 Replies
7. Shell Programming and Scripting
Hi,
I am calling a Perl script in my shell script. When Perl script is executed it asks for a answer to be entered by user from terminal. How can i pass that value from my shell script ??
I know I can change perl script to default the answer but i dont have access to do that so only option i... (5 Replies)
Discussion started by: varun22486
5 Replies
8. Shell Programming and Scripting
Input are file and file1
file contains
store.bal
product.bal
category.bal
admin.bal
file1 contains
flip.store.bal ::FFFF:BADC:CD28,::FFFF:558E:11C5,6,8,2,1,::FFFF:81C8:CA8B,::FFFF:BADC:CD28,1,0,0,0,::FFFF:81C8:11C5,2,1,0,0,::FFFF:81DC:3111,1,0,1,0
store.bal.... (2 Replies)
Discussion started by: veeruasu
2 Replies
9. Shell Programming and Scripting
I have a test file with the following format, It contains the username_date when the user was locked from the database.
$ cat lockedusers.txt
TEST1_21062016
TEST2_02122015
TEST3_01032016
TEST4_01042016
I'm writing a ksh script and faced with this difficult scenario for my... (11 Replies)
Discussion started by: humble_learner
11 Replies
10. UNIX for Beginners Questions & Answers
Input file:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 (6 Replies)
Discussion started by: Sagar Singh
6 Replies
LEARN ABOUT DEBIAN
javascript::rpc::server::cgi
JavaScript::RPC::Server::CGI(3pm) User Contributed Perl Documentation JavaScript::RPC::Server::CGI(3pm)
NAME
JavaScript::RPC::Server::CGI - Remote procedure calls from JavaScript
SYNOPSIS
package MyJSRPC;
use Carp;
use base qw( JavaScript::RPC::Server::CGI );
sub add {
my $self = shift;
my @args = @_;
unless(
@args == 2 and
$args[ 0 ] =~ /^d+$/ and
$args[ 1 ] =~ /^d+$/
) {
croak( 'inputs must be digits only' );
}
return $args[ 0 ] + $args[ 1 ];
}
sub subtract {
my $self = shift;
my @args = @_;
unless(
@args == 2 and
$args[ 0 ] =~ /^d+$/ and
$args[ 1 ] =~ /^d+$/
) {
croak( 'inputs must be digits only' );
}
return $args[ 0 ] - $args[ 1 ];
}
package main;
use strict;
my $server = MyJSRPC->new;
$server->process;
DESCRIPTION
JavaScript::RPC::Server::CGI is a CGI-based server library for use with Brent Ashley's JavaScript Remote Scripting (JSRS) client library.
It works asynchronously and uses DHTML to deal with the payload.
In order to add your custom meothds, this module should be subclassed.
The most current version (as of the release of this module) of the client library as well as a demo application have been included in this
distribution.
INSTALLATION
To install this module via Module::Build:
perl Build.PL
./Build # or `perl Build`
./Build test # or `perl Build test`
./Build install # or `perl Build install`
To install this module via ExtUtils::MakeMaker:
perl Makefile.PL
make
make test
make install
METHODS
new()
Creates a new instance of the module. No further options are available at this time.
query()
Gets / sets the query object. This has the side effect of extracting the env() data.
get_new_query()
This method generates a new query object. It is used internally by the query() method. This method should only be used if you want to sup-
ply a query object other than the standard CGI.pm object. However, it must be a CGI.pm compatible object. Here's an example using CGI::Sim-
ple.
sub get_new_query {
require CGI::Simple;
my $q = CGI::Simple->new();
return $q;
}
env()
Gets / sets a hash of information related to the currently query. The resulting structure contains four items:
* method - the method called
* params - an array of parameters for the method
* uid - the unique id for this query
* context - the context id
error_message()
Get / sets the error message sent to the client if an error occurred.
process()
Processes the current query and either returns the result from the appropriate method, or an error to the client and returns either true or
false, respectively, to the caller. An error will occur if the method name is blank, or the method has not been defined. This function
takes an optional CGI.pm compatible object as an input.
Your subclass' method will be evaled and will either return an error to the caller if it died, or return a valid result payload on success.
error()
Returns a valid error payload to the client and false to the caller. It will automatically call error_message() for you.
result()
Returns a valid result payload to the client and true to the caller.
SEE ALSO
* http://www.ashleyit.com/rs
AUTHOR
* Brian Cassidy <brian@alternation.net>
COPYRIGHT AND LICENSE
Copyright 2005 by Brian Cassidy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.8.8 2005-10-06 JavaScript::RPC::Server::CGI(3pm)