This the bash script (dpa_report.sh) that creates the REST -API report. I have taken out the actual username and password for the purposes of this post. If I run this script from the command line and pass it the hostname it works. For example
works. The hostname is set to $1 in the script.
But when dpa_report.sh is called from the php script I get the permission errors.
Hello everybody:
Im trying to run the following script on my sol9 machine:
line=''
((lineCount= 0))
export lineCount
more /tmp/MSISDNs | wc -l > /tmp/tmp
cat /tmp/tmp | read lineCount
export lineCount;
while (( lineCount > 0 ))
do
line= tail -$lineCount... (5 Replies)
I'm just not sure where to start looking into this. I want to be able to create switches for my script. Back in the day I'd make my scripts interactive...you know:
echo "what report do you want"
echo "A)boxes with errors"
echo "B)boxes with more than 5 errors"
echo "C)Service groups that have... (3 Replies)
Hi All,
I need to pass a variable to perl script from bash script, where in perl i am using if condition. Here is the cmd what i am using in perl
FROM_DATE="06/05/2008"
TO_DATE="07/05/2008"
"perl -ne ' print if ( $_ >="$FROM_DATE" && $_ <= "$TO_DATE" ) ' filename"
filename has... (10 Replies)
How do I pass a bash variable to a javascript?
I've tried
#!/bin/bash
echo "Content-type: text/html"
echo ""
echo "<html>"
echo "<head>"
counter=0
echo '<script>
window.parent.document.forms.counter.value = "$counter";
</script>'
I have an iframe script which I am trying to pass a... (3 Replies)
Hello,
How can I pass a variable into a 2nd file? I'm running a script:
ls -la $1 >pem99
cat pem99 | awk '{ print $3}' >us99
cat us99 | read us98
This then tells me the owner of a file.
my second file is:
echo OWNER GROUP OTHERS
echo
echo --data-- $us98
... (2 Replies)
Hello everyone,
I've been looking how to pass variables between bash and php-cli in 1 file. So far i got this:
#!/bin/bash
echo "This is bash"
php << EOF
<?php
echo "This is php\n";
?>
EOF
I would now like to be able to pass a variable declared in the bash to the php. I already... (0 Replies)
Would really appreciate it if someone could point out my mistake in this line of code, i've been staring blankly at it trying everything i can think of some time now and coming up with nothing.
#!/bin/bash
echo "Enter Username"
read Username
awk -F: -v var=${Username} '/^var:/... (9 Replies)
I'm trying to write a basic bash script that takes input you give (what directory, if any, what name, if any ....) and passes the information to find.
I'm trying to just create a string with all variables and then pass it to find. So far I have this extremely simple:
#!/bin/bash -f
... (2 Replies)
Hi,
I wanted to pass an argument to a bash script. So that the argument is used inside the awk command inside the bash script.
I know the noraml way of passing argument to a bash script as below :
sh myScript.sh abc
Inside the bash script i can use like this
myArg1=$1
wc $myArg
But... (8 Replies)
Hi All,
I need to pass a variable from bash script to perl script and in the perl script i am using those variables in the sql query but its giving
error :
Use of uninitialized value $ENV{"COUNTRYCD"} in concatenation (.) or string at /GIS_ROOT/custom/tables/DBread_vendor.pl line 50.
Can ... (6 Replies)
Discussion started by: NileshJ
6 Replies
LEARN ABOUT DEBIAN
webservice::youtube::videos
WebService::YouTube::Videos(3pm) User Contributed Perl Documentation WebService::YouTube::Videos(3pm)NAME
WebService::YouTube::Videos - Perl interface to youtube.videos.*
VERSION
This document describes WebService::YouTube::Videos version 1.0.3
SYNOPSIS
use WebService::YouTube::Videos;
my $api = WebService::YouTube::Videos->new( { dev_id => YOUR_DEV_ID } );
# Call API youtube.videos.list_featured
my @videos = $api->list_featured;
foreach my $video (@videos) {
# $video->isa('WebService::YouTube::Video');
}
# Call other APIs
my @videos = $api->list_by_user($user);
my @videos = $api->list_by_tag($tag);
my $video = $api->get_details($video_id);
# Parse XML
my @video = $api->parse_xml($xml); # when $xml contains <video_list>
my $video = $api->parse_xml($xml); # when $xml contains <video_details>
DESCRIPTION
This is a Perl interface to YouTube REST API.
See Developer APIs <http://youtube.com/dev> and Developer API -- REST Interface <http://youtube.com/dev_rest> for details.
SUBROUTINES /METHODS
new(\%fields)
Creates and returns a new WebService::YouTube::Videos object. %fields can contain parameters enumerated in "ACCESSORS" section.
parse_xml($xml)
Parses XML and returns the result. $xml should be an object that XML::Simple can understand.
get_details( $video_id )
Returns a WebService::YouTube::Video object. $video_id is an ID of the video which you want to get details.
See <http://youtube.com/dev_api_ref?m=youtube.videos.get_details> for details.
list_by_tag( $tag, \%fields )
Returns an array of WebService::YouTube::Video object. $tag is a keyword string separated by a space. %fields can contain the optional
parameters.
page
1 <= page
per_page
per_page <= 100 (default 20)
See <http://youtube.com/dev_api_ref?m=youtube.videos.list_by_tag> for details.
list_by_user( $user )
Returns an array of WebService::YouTube::Video object. $tag is a keyword string separated by a space. %fields can contain optional
parameters.
See <http://youtube.com/dev_api_ref?m=youtube.videos.list_by_user> for details.
list_featured( )
Returns an array of WebService::YouTube::Video object.
See <http://youtube.com/dev_api_ref?m=youtube.videos.list_featured> for details.
ACCESSORS
dev_id
Developer ID
ua
LWP::UserAgent object
DIAGNOSTICS
dev_id is required
Developer ID is required when you call API of YouTube.
invalid XML
The XML is not a YouTube's XML.
unknown response
The ut_response is neither <video_list> nor <video_details>.
CONFIGURATION AND ENVIRONMENT
WebService::YouTube::Videos requires no configuration files or environment variables.
DEPENDENCIES
Class::Accessor::Fast, LWP::UserAgent, XML::Simple, WebService::YouTube::Util, WebService::YouTube::Video
INCOMPATIBILITIES
None reported.
BUGS AND LIMITATIONS
No bugs have been reported.
Please report any bugs or feature requests to "bug-webservice-youtube@rt.cpan.org", or through the web interface at
<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WebService-YouTube>. I will be notified, and then you'll automatically be notified of
progress on your bug as I make changes.
AUTHOR
Hironori Yoshida <yoshida@cpan.org>
LICENSE AND COPYRIGHT
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
perl v5.10.1 2010-08-01 WebService::YouTube::Videos(3pm)