capture the ouput!


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting capture the ouput!
# 1  
Old 12-20-2005
capture the ouput!

Hi,

my perl script is calling another external java program. The Java in turn prints out a string. how can I capture the string.
------------------
#!/usr/bin/perl

print "Content-type:text/html\n\n";

use CGI;
$query = new CGI;
$theCookie = $query->cookie('someCookie');
$user = system("cd /some/location;java myJavaClass $theCookie");

--------------------------
Java is writing the string to the browser. I want to store that string to a variable so that I use it in perl

Thanks in advance
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to ouput not in file2 using awk?

Hi All, Seeking for your assistance on how to ouput the file which is not match in file 1 and file 2 using awk. I tried NR=FNR but it's not working, it will only show the match record. Ex. File1 abc def ghi File2 23a gd abc Output: abc (2 Replies)
Discussion started by: znesotomayor
2 Replies

2. Shell Programming and Scripting

<< Filter and Format the ouput >>

Hi All, I have a output like below $ cat aa.lst Value of output parameters --------------------------------------- Parameter Name : SNAPSHOTTIMESTAMP Parameter Value : 2014-01-07-15.21.50.022423 Parameter Name : DATABASESIZE Parameter Value : 96178176 ... (2 Replies)
Discussion started by: kamauv234
2 Replies

3. Shell Programming and Scripting

Append ouput in a single line

Hi Guys, I need to append some data to a new file, but i need to make sure that when i use to >> command again.I dont go to the new line. i append the data on the same line. Please help regarding the same. Thanks in advance..!!! (3 Replies)
Discussion started by: jaituteja
3 Replies

4. Shell Programming and Scripting

Format Ouput

I have this input file Switch 0; Sun Sep 11 12:40:53 2011 EDT (GMT+4:00) 12:40:53.159984 SCN Port Offline;g=0x1e4b6 A2,P0 A2,P0 379 NA 12:40:53.159991 *Removing all nodes from port A2,P0 A2,P0 379 NA 18:45:31.326604 Port Elp engaged ... (1 Reply)
Discussion started by: greycells
1 Replies

5. Shell Programming and Scripting

View ouput as a file

Hi all , I have a view in teradata , the ouput of that view have to be stored as a file with delimitere as '|'.Is there any possibility of doing this in unix ? Thanks in advance , Vinoth (6 Replies)
Discussion started by: vino.paal
6 Replies

6. UNIX for Dummies Questions & Answers

Finding string and getting formatted ouput

I have follwoing text file as alarm dump. A1/EXT "B25I11K0150_F W" 512 090629 1121 RADIO X-CEIVER ADMINISTRATION BTS EXTERNAL FAULT MO RSITE CLASS RXOCF-405 DKRD01_INDS 1 EXTERNAL ALARM MAINS FAIL ... (1 Reply)
Discussion started by: lalchand
1 Replies

7. Shell Programming and Scripting

Cannot redirect ouput?????

Hello experts, I'm testing a program that prints error message to the screen. I want to redirect the output to a file using >. but the message only prints on screen and not writing to the file, Any suggestion on what I might try? (3 Replies)
Discussion started by: minifish
3 Replies

8. Windows & DOS: Issues & Discussions

Wrong Ouput when using printf under SFU

I used printf to print the following under SFU, lrs=`cat lrs` hrs=`cat hrs` tp=`cat tp` printf “\n\n%5sM = $lrs Ohms%5sX = $hrs Ohms%5sT = $tp %%\n\n\n” > file cat file With the above script, I used %% after $tp only as a percentage sign and I get only the following output: % T =... (5 Replies)
Discussion started by: ilak1008
5 Replies

9. Shell Programming and Scripting

Identifying same character and ouput the sum

Hi all, I have a list of data below. As long as there are same character in the 1st column (eg xxx ), i would want to add all the numbers in the 3rd column and display as the output below so the total would be 10+20+30 = 60. Can anybody help to do this using nawk? Using solaris by the way. ... (12 Replies)
Discussion started by: Raynon
12 Replies

10. UNIX for Dummies Questions & Answers

Red Hat - ouput capture

Red Hat 7.2 On command line.. i need to ouput or capture just.. CPE3236313839393 Fri Nov 1 00:05 - 00:05 (00:00) the time inside the brackets (00:00) ... i havea list of about a hundred from sperate dates in a long file. I need to some how grep or i dunno all times from Nov 1 and... (3 Replies)
Discussion started by: juxtaman
3 Replies
Login or Register to Ask a Question
RHINO-JSC(1)						      General Commands Manual						      RHINO-JSC(1)

NAME
rhino-jsc - invokes the rhino JavaScript compiler SYNOPSIS
rhino-jsc [options] file1.js [file2.js...] DESCRIPTION
This manual page documents briefly the rhino-jsc command. This manual page was written for the Debian distribution because the original program does not have a manual page. It is written according to the html documentation. rhino-jsc is a start script for the rhino JavaScript compiler. The JavaScript compiler translates JavaScript source into Java class files. The resulting Java class files can then be loaded and executed at another time, providing a convenient method for transferring JavaScript, and for avoiding translation cost. Note that the top-level functions available to the shell (such as print) are not available to compiled scripts when they are run outside the shell. OPTIONS
-extends java_class_name Specifies that a java class extending the Java class java_class_name should be generated from the incoming JavaScript source file. Each global function in the source file is made a method of the generated class, overriding any methods in the base class by the same name. -implements java_intf_name Specifies that a java class implementing the Java interface java_intf_name should be generated from the incoming JavaScript source file. Each global function in the source file is made a method of the generated class, implementing any methods in the interface by the same name. -debug, -g Specifies that debug information should be generated. May not be combined with optimization at an optLevel greater than zero. -nosource Does not save the source in the class file. Functions and scripts compiled this way cannot be decompiled. This option can be used to avoid distributing source or simply to save space in the resulting class file. -o outputFile Writes the class file to the given file (which should end in .class). The string outputFile must be a writable filename. -opt, -O optLevel Optimizes at level optLevel, which must be an integer between 0 and 9. -package packageName Specifies the package to generate the class into. The string packageName must be composed of valid identifier characters optionally separated by periods. -version versionNumber Specifies the language version to compile with. The string versionNumber must be one of 100, 110, 120, 130, or 140. See JavaScript Language Versions for more information on language versions. EXAMPLE
Example compiling the NervousText.js applet written in JavaScript. The example is provided in the librhino-java-doc package. $ rhino-jsc -extends java.applet.Applet -implements java.lang.Runnable NervousText.js SEE ALSO
The online documentation under http://www.mozilla.org/rhino/jsc.html AUTHOR
This manual page was written by Wolfgang Baer <WBaer@gmx.de>, for the Debian project (but may be used by others). February 12, 2005 RHINO-JSC(1)