12-10-2008
Need Help with Perl Scripting Issue.
The Perl script runs fine without any error from command line. The script executes an external command and prints the output on a web page. But somehow when I call it from URL it does not work. Any help will be appreciated. Here is the script:
--test.pl
#!/usr/bin/perl
#
use warnings;
use strict;
use Socket;
print "Content-type: text/html\n\n";
print <<ENDOFHTML;
<HTML>
<HEAD>
<TITLE>Test Page</B></CENTER></TITLE>
<BODY background="/icons/page-background.png">
<body text="#808080">
<IMG SRC="/icons/test.gif" width="142" height="60" align="left">
<h1 align="center" font size=1> Netops-DashBoard</center></h1>
<br>
<br>
ENDOFHTML
open(SMP, "/usr/local/bin/sshpass -p test ssh test.com /usr/contrib/bin/serverinfor -b |") || die "Failed: $!\n";
while ( <SMP> ) {
chomp;
my $line = $_;
print "$_ \n";
print "<br>\n";
} # while
print "</BODY>";
print "</HEAD>";
print "</HTML>";
-----The script does not work when we call from :
http://www.xxx.xxx/test.pl
In the sense that the While Loop does not get executed.....
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Guys,
I am quite new to Shell Scripting... I need ur help.. This is very urgent.
The thing is like,
I need to match a IP address (ex 192.168.200.56) i.e, xxx.xxx.xxx.xx inside a KSH script,but if we enter in different format other than the specified format (ex jjj.ksj., 1.0...), it should... (3 Replies)
Discussion started by: mraghunandanan
3 Replies
2. Shell Programming and Scripting
Hello,
I have an ASCII file (many files of the same format, but different dates and numbers) in the format like below:
2008.01.02,08:00,1.46520,1.46520,1.46410,1.46440,70
2008.01.02,08:05,1.46450,1.46560,1.46440,1.46540,79
2008.01.02,08:10,1.46530,1.46540,1.46490,1.46500,46... (8 Replies)
Discussion started by: chief2000
8 Replies
3. Shell Programming and Scripting
Hi
How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies
4. Shell Programming and Scripting
I am having an issue with a script that I created today, my first attempt at this, and was wondering if anyone can give me insight to what changes need to be made. Below is a copy of the script that I have written. WEe are trying to monitor whether or not a services is running. I do have a cron... (1 Reply)
Discussion started by: lsudubee
1 Replies
5. What is on Your Mind?
Hi all,
I would like to start developping some good scripting skills. Do you think it would be best to start with shell scripting or Perl? I already got a fundation, really basics, in perl. but I am wondering what would be best to be good at first.
Can you please help me determine which one to... (14 Replies)
Discussion started by: Pouchie1
14 Replies
6. Shell Programming and Scripting
needing this script to shut down 1 IceS and start up another, close the 2nd one after 12 seconds and then reboot. here is what i have so far
#!/bin/bash
ShutDown() {
echo "Shutdown in progress."
wall <<ENDOFWALL
CI Shutdown has been intiated!!!!
Shutdown will occur in 30 seconds...... (1 Reply)
Discussion started by: Zaine
1 Replies
7. What is on Your Mind?
Gents,
I have been working in a Solaris/Unix environment for about 9 months. I took some linux classses online before getting the job. But, I am not very good at scripting. I want to learn how to script. Do you think that I should start with Shell scripting or Perl? I wanted to continue with... (2 Replies)
Discussion started by: Pouchie1
2 Replies
8. Web Development
i am going to study any one of the scripting languages mentioned above(shell 0r perl scripting) . Which is having more scope for a fresher? (1 Reply)
Discussion started by: Anna Hussie
1 Replies
9. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Here is the problem:
Lesson 13 OBJ1: OST Class online.
Write a script called obj13-1.pl and a library... (2 Replies)
Discussion started by: valhalla
2 Replies
10. Shell Programming and Scripting
I am having a problem. which I have described below>>
I have to run a script with the format : <File_name><Start_date><End_date>
abcd.sh 19-JAN-2015 01-May-2014
problem is I need to compare these two dates and throw an error as start date must be less than or equal to end date.
But... (13 Replies)
Discussion started by: Chandan_Bose
13 Replies
LEARN ABOUT SUNOS
gst-inspect
gst-inspect-0.8(1) User Commands gst-inspect-0.8(1)
NAME
gst-inspect-0.8, gst-inspect - print information about a GStreamer element or plugin
SYNOPSIS
gst-inspect-0.8 [--print-all] [gst-std-options] [element | plugin]
gst-inspect [--print-all] [gst-std-options] [element | plugin] [--gst-list-mm] [--gst-mm=string] [--print]
DESCRIPTION
gst-inspect-0.8 prints information about available GStreamer plugins, information about a particular plugin, or information about a partic-
ular element.
If no element or plugin argument is specified, gst-inspect-0.8 prints a list of all plugins and elements. If an element or plugin argument
is specified, gst-inspect-0.8 prints information about that element or plug-in. If a given argument is valid as either an element or a
plugin, gst-inspect-0.8 treats the argument as an element, by default.
gst-inspect is a wrapper script that runs the latest installed version of gst-inspect-X.X. For example, if both gst-inspect-0.7 and gst-
inspect-0.8 are installed on your system, gst-inspect runs gst-inspect-0.8.
OPTIONS
The following options are supported by gst-inspect-0.8 and gst-inspect:
--print-all Print all elements. You can also use -a to specify this option.
gst-std-options Standard options available for use with most GStreamer applications. See gst-std-options(5) for more information.
The following options are supported by gst-inspect only:
--gst-list-mm List found major/minor versions. This option displays the versions that are available.
--gst-mm=string Force major/minor version. This option enables you to specify a specific version to run, if you do not want to run the
default version.
--print Print wrapped command line. This option displays the command that will be run, and then runs the command.
OPERANDS
The following operands are supported:
element Name of an element.
plugin Name of a plugin.
EXAMPLES
Example 1: Displaying Information About a Plugin:
example% gst-inspect-0.8 alaw
Plugin Details:
Name: alaw
Description: ALaw audio conversion routines
Filename: /usr/lib/gstreamer-0.8/libgstalaw.so
Version: 0.8.3
License: LGPL
Package: GStreamer Plugins
Origin URL: http://gstreamer.net/
alawenc: PCM to A Law conversion
alawdec: A Law to PCM conversion
2 features:
+-- 2 elements
Example 2: Running the Wrapper Script and Displaying the Command Name
example% gst-inspect --print
/usr/bin/gst-inspect-0.8
FILES
The following files are used by this application:
/usr/bin/gst-inspect-0.8Executable for GNOME help browser
/usr/bin/gst-inspect Wrapper script that runs the latest installed version of gst-inspect-X.X
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWgnome-media |
+-----------------------------+-----------------------------+
|Interface stability |External |
+-----------------------------+-----------------------------+
SEE ALSO
gst-complete(1), gst-compprep(1), gst-feedback(1), gst-launch(1), gst-launch-ext(1), gst-md5sum(1), gst-register(1), gst-thumbnail(1), gst-
typefind(1), gst-xmlinspect(1), gst-xmllaunch(1), gstreamer-properties(1), libgstreamer-0.8(3), libgstgetbits(3), gst-std-options(5)
NOTES
Original man page written by the GStreamer team at http://gstreamer.net/.
Updated by Brian Cameron, Sun Microsystems Inc., 2004.
SunOS 5.10 14 Oct 2004 gst-inspect-0.8(1)