Redirecting the output

Hi Satya, Thanks for helping me out couple of times earlier. I am having one more problem.
I am able to get the runtime values of the server, but while I am unable to redirect the output to a dat file in the local box, from which I am extracting the results. I tried to use redirect(), but not able to make it work. I need help with the right command and any suggestions, that I can use to output the results to a dat file.
Thanks again.

Not sure I understand what you are trying to achieve. When you use redirect('./foo.dat') wlst will write the output that comes out of WLST to foo.dat. You should be able to read this file and get the outout and parse it.
I am not sure what you are trying to do, can you post any errors you are seeing?
-satya
BEA Blog: http://dev2dev.bea.com/blog/sghattu/

Similar Messages

  • Redirect the output of SQL*Plus to the file

    Hi all,
    I have the following command to run:
    sqlplus username/password @myfile.sql
    I don't know how to redirect the output to the file.
    Also in the script myfile.sql I have the defined variable, &VP and
    How can I substitute this variable(&VP) at the run time.
    Thanks,
    JP

    Assumed you like to replace your defined variable VP by number 4. SInce it is posintional parameter,instead of wrinting &VP, write
    VP:=&1
    sqlplus>spool redirect.txt
    sqlplus>@myfile.sql 4
    sqlplus>spool off

  • IS IT POSSIBLE TO REDIRECT THE OUTPUT TO ANOTHER PAGE?

    Hi all,
    Is it possible to redirect the output when I excute my query in iSQL*plus to another predifined html page?
    If yes how do I do this?
    Thanks a mill

    You could do this..just read on..
    It would generate a html page for you...and..so on..!
    In addition to plain text output, the SQL*Plus command-line interface enables you to generate either a complete web page, or HTML output which can be embedded in a web page. You can use SQLPLUS -MARKUP "HTML ON" or SET MARKUP HTML ON SPOOL ON to produce complete HTML pages automatically encapsulated with <HTML> and <BODY> tags.
    By default, data retrieved with MARKUP HTML ON is output in HTML, though you can optionally direct output to the HTML <PRE> tag so that it displays in a web browser exactly as it appears in SQL*Plus. See the SQLPLUS MARKUP Options and the SET MARKUP command for more information about these commands.
    SQLPLUS -MARKUP "HTML ON" is useful when embedding SQL*Plus in program scripts. On starting, it outputs the HTML and BODY tags before executing any commands. All subsequent output is in HTML until SQL*Plus terminates.
    The -SILENT and -RESTRICT command-line options may be effectively used with -MARKUP to suppress the display of SQL*Plus prompt and banner information, and to restrict the use of some commands.
    SET MARKUP HTML ON SPOOL ON generates an HTML page for each subsequently spooled file. The HTML tags in a spool file are closed when SPOOL OFF is executed or SQL*Plus exits.
    You can use SET MARKUP HTML ON SPOOL OFF to generate HTML output suitable for embedding in an existing web page. HTML output generated this way has no <HTML> or <BODY> tags.

  • How to redirect the output display on Ultra 5 box.

    Hello,
    Good day to you.
    I have issues with redirecting display output to my console server (which is configured with cyclades switch) on a newly installed solaris 10, Ultra 5 box.
    I could access the output display on the monitor when I connect it directly to the serial port. But I also have my parallel port connected to cyclades switch which is primarily being used for accessing multiple servers thro' one single console server.
    When I try to access my ultra 5 box thro' console server, the display not getting redirected over there..I did checked the port from cyclades switch front, it did work well with other machines.
    Looks like some work needs to be done at Ultra 5 box level so that the parallel port can send output signals to the respective port on cyclades switch and consequently to the console server.
    Any thoughts ??
    Thanks.

    Hi,
    Good day to you.
    Apologize for quoting "Parallel" port. It is a in-built 25pin serial connector placed next to regular 15 pin serial port.
    Just to make a point here, this 25 pin serial connector has an external converter attached with other side having RJ45 jack.
    CAT5 cable connected between switch port to this RJ45 jack.
    I did tested this converter with another machine and could able to access the display on my console server. So it seems to be the connectivity from serial port to switch port works fine.
    Adding to that, this ultra 5 box with the current connectivity set up was working fine until I rebuild this machine. I was very well accessing this box thro my console server. There was no changes done except rebuilding the operating system.
    I think some work needs to be done at the ultra 5 box level to get this 25pin serial connector to act.
    Thanks.

  • Redirecting the output of java compilation to a text file

    i tried to redirect the result of the java compilation to the text file using
    javac zz.java > compile.txt
    It works if the program has no errors and it did not work if it have errors. Wat is the reason it did not work for wrong programs.

    This has nothing to do with Java. It's your command shell.
    If you're on linux, then it's because the errors go to stderr and you're only redirecting stdout. I assume Windows is similar, but I don't know much about that.
    For bourne shell family on linux (sh, ksh, bash, zsh), you'd do
    javac zz.java > compile.txt 2>&1I'm not sure what the syntax is for csh family.

  • Re: how to redirect the output from studio to a file

    the thing is i have large amount of output(crapy uni project), it's kind of hard to read them in IDE output window, and i am too lazy to use fwrite to a file. in terminal it's just "output > filename", but doesn't work in IDE. anyone knows?

    The Arguments property will take a "> file".
    This property can be set in several places.
    In studio 10/11:
    - Debug->LoadProgram
    - Debug->LoadRecent->EditLoadCommandList
    After you've loaded a program...
    - Debug->DbxConfigure
    In studio 12:
    Project (ctx menu)->Properties->Running(Category)

  • Junk Characters in Report Output(While redirecting the output to text file)

    While generating the report (Reports 9i) output to a text file, I get the report output that contains junk characters. The other output formats viz. pdf, rtf have no problem.
    Please share how to correct it.
    Thanks.

    Yes, the MODE is set to Character and DESFORMAT is set to DFLT.
    Still the problem exists.
    Any idea please?

  • How to redirect CELLCLI output to text file

    Hi,
    I would like to redicrect the output of the cellcli command to a text file .
    For example , how to redirect the output of this command to a text file on /tmp
    CellCLI> list metrichistory where objectType = 'CELL' -
    and name = 'CL_TEMP'Thanks

    cellcli has spooling capabilities similar to sqlplus:
    CellCLI> help spool
      Usage:  SPO[OL] [<filename> [ CRE[ATE] | REP[LACE] | APP[END]] | OFF ]
      Purpose: SPOOL <filename>: Direct the results to the file <filename>.
               SPOOL OFF: Turn off the spooling.
               SPOOL: Check the current spooling status.
      Arguments:
        <filename>: The filename where the results will be output.
      Options:
        [APPEND]: If the filename already exists, the following output will
                  be appended to the file. Without this option, the existing file
                  contents will be replaced.
        [CREATE]: If the filename already exists, an error is reported.
        [REPLACE]: If the filename already exists, the contents will be
                  replaced.  This is the default, when no option is provided.
      Examples:
        spool myfile
        spool myfile append
        spool off
        spoolBut if you are trying to script it, it would be easier to just run it command line:
    # cellcli -e "list metrichistory where objectType = 'CELL' and name = 'CL_TEMP'" > /tmp/CL_TEMP.txtAlso look into dcli which allows you to run cellcli commands on one or more cells from a compute node.
    Good luck.

  • Redirecting XSLT output to multiple files

    Hi,
    I am trying to redirect the output of the XSLT into multiple files using
    <xsl:variable name="filename" select="concat(@id,'.xml')" />
    <redirect:write select="$filename">
    </redirect:write>I dont want to hard-code the directory of the $filename in XSL, I want to set it or resolve it programatically in the java code.
    Can you please tell me if this can be done in someway ?

    Aravinda wrote:
    I dont want to hard-code the directory of the $filename in XSL, I want to set it or resolve it programatically in the java code.
    Can you please tell me if this can be done in someway ?You + setParameter + method of your Transformer in java code to set parameters. like below:
    transformer.setParameter("message1", "This is my message to XSLT from Java Class.");
    transformer.setParameter("message2", "Hello XSLT how are you?");
    . . .You can retrieve above parameters in global parameters/variables(must be as child of xsl:stylesheet element in xslt) defined in xslt like below:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:param name="message1"></xsl:param>
         <xsl:variable name="message2"></xsl:variable>
         <xsl:template match="/">
              <xsl:value-of select="$message1"/>     // retrieving message1
              <xsl:value-of select="$message2"/>     // retrieving message2
              <xsl:value-of select="concat($message1,$message2)"/>     // performing concat on message1 and message2
         </xsl:template>
    </xsl:stylesheet>*Cheers
    TYPUROHIT*
    (Tejas Purohit)

  • Runtime.getRuntime().exec hangs and doesn't print the output

    Hi,
    I have written the following code to execute the command "psexec ipaddress -u userid -p password -l -c execute.exe >> c:/25_showoutpout.txt" and print the output in 25_showoutpout.txt file.
    import java.io.*;
    public class ExecTest{
         public static void main(String args[]) throws IOException{
         String args1 = "psexec ipaddress -u userid -p password -l -c execute.exe >> c:/25_showoutpout.txt";
         try{
         Process p=Runtime.getRuntime().exec(args1);
    int i = p.waitFor();
         System.out.println("Done.with time "+i);
         }catch(Exception e){
              System.out.println("The error is "+e);
    But this program hangs and creates a blank 25_showoutpout.txt file.In the process list I can see the process running, but it doesn't redirect the output in the txt file.When i run the command from the command line it runs fine.Please help me.
    Thanks in advance

    Hi,
    I have written the following program to get the output.But still the required output is not coming in the console file.Only the messages that gets printed in the parent console that is coming in the file.But the expected output is to get the messages from the child window which gets executed while the .exe runs.
    import java.io.*;
    public class RuntimeExecTest{
    public static void main(String args[]){
    String s = null;
    String result= null;
    int count =0;
    try{
              // read the output from the command
    String cmd = "cmd.exe /c D:/installer/PsTools.zip/PsTools/psexec.exe ipaddress -u userid -p password -l -c excute.exe >> C:/RuntimeExec_25.txt";
         Process p = Runtime.getRuntime().exec(cmd);
         InputStream is = p.getInputStream();
         // Get the std in to the process.
         OutputStream os = p.getOutputStream();
         // Get the std err from the process.
         InputStream es = p.getErrorStream();
         // Create readers for those streams.
         BufferedReader reader = new BufferedReader(new InputStreamReader(is));
         BufferedReader errReader = new BufferedReader(new InputStreamReader(es));
         String line;               
         // Read STDOUT into a buffer.
         // If no STDOUT check STDERR.
         while((line = errReader.readLine()) != null){
              // Do something with data here if you wish.
         System.out.println( line );
         while((line = reader.readLine()) != null){
              // Do something with data here if you wish.
         System.out.println( line );
         System.exit(0);
    catch( Exception ex )
    ex.printStackTrace();
    }

  • How to redirect console output while starting server from within IDE

    Hello, i am using Weblogic Workshop IDE. When I start the server, a new cmd shell is launched and the jvm output is displayed in this cmd shell window. How can I redirect this output to show up within the IDE (for instance in the Console view)?
    Problem is that when an error occurs, the cmd window disappears and I cannot tell what the error was.
    Surely there is a way to do this as other IDEs (JBuilder, Rational etc.) allow this.
    Thanks:
    -Sam

    Hi Sam,
    Unfortunately, this feature does not exist in Workshop 9.2
    Regarding your question about redirecting the output, the logs are saved under the domain directory.
    You could also refer to the following section for additional info on redirecting the output to multiple destinations.
    http://e-docs.bea.com/wls/docs90/ConsoleHelp/taskhelp/logging/RedirectJVMOutput.html
    Hope this helps.
    cheers
    Raj

  • I can't get the output of javac or java

    I want to redirect the output of compilation into a text file
    just like,
    javac Sample.java > err.txt
    Please give me a solution

    I assume you're using some kind of unix.
    Error messages are sent to stderr, so using the ">" character won't work (it will only redirect the stdout messages). To direct ALL messages to a file, use ">&".
    For example,
    javac Sample.java >& err.txt
    Hope that helps.
    - Matt

  • Possible to redirect JSP output?

    Is it possible to redirect the output of a JSP either directly to a printer or directly to a File object? I would like to write a report template using JSP and be able to display it via a browser (so far so good, that's what JSP does) but I'd also like to take the same output that the JSP generates and either print it directly (as in printing many many reports without having to run each one in a browser and click the browser print button) AND to be able to email the report to a client.
    Each of these means I need to redirect the output of a JSP. I couldn't find anything in this forum about that. Is this even possible?
    Thank you in advance for your answers.

    The problem with using a new URLConnection is that the current session is not applied to the JSP page as desired.
    For those using Tomcat 4, which implements the Servlet 2.3 spec, this page describes how to replace the output stream of a servlet with your own.
    http://www-106.ibm.com/developerworks/java/library/j-tomcat/
    The example implements a character replacement mechanism. Using a filter and a wrapper. I modified this example to redirect the output stream to a file, which allowed me to then e-mail the output of a JSP. I did this by only using the wrapper classes.
    Here are the relavant excerpts from my code
    //Inside the servlet:
    //{snip}...
    String sFileName = "e:\\temp\\email\\temp.html";
    RedirectTextWrapper rTW =
    new RedirectTextWrapper(response, sFileName);
    gotoPage(sAddress, request, rTW);
    //{snip}...
    //Supporting classes:
    class RedirectTextStream
    extends ServletOutputStream {
    private OutputStream intStream;
    private boolean closed = false;
    public RedirectTextStream(String sFileName) {
    try{
    intStream = new FileOutputStream(sFileName);
    }catch(FileNotFoundException e){
    e.printStackTrace();
    public void write(int i)
    throws java.io.IOException {
    intStream.write(i);
    public void close()
    throws java.io.IOException {
    if (!closed) {
    intStream.close();
    closed = true;
    public void flush() throws java.io.IOException {
    intStream.flush();
    class RedirectTextWrapper
    extends HttpServletResponseWrapper {
    private PrintWriter tpWriter;
    private RedirectTextStream tpStream;
    public RedirectTextWrapper(ServletResponse inResp,
    String sFileName)
    throws java.io.IOException {
    super((HttpServletResponse) inResp);
    tpStream = new RedirectTextStream(sFileName);
    tpWriter = new PrintWriter(tpStream);
    public ServletOutputStream getOutputStream()
    throws java.io.IOException {
    return tpStream;
    public PrintWriter getWriter()
    throws java.io.IOException {
    return tpWriter;
    }

  • Redirecting process output to jtextarea

    I'd like to redirect the output of a process to a JTextArea that is continuously updated as the output comes in. Can anyone help me with this?

    I'm basically confused as to how to do this.
    I have the following class that I obtained from a site.
    There's an example posted as to how to redirect system error ouput to a JTextArea using the Stream class below. I want to take the ouput of a launched process, and send it to a textarea.
    import java.io.IOException;
    import java.io.OutputStream;
    import javax.swing.JTextArea;
    public class TextAreaOutputStream extends OutputStream{
           private JTextArea textArea;
           private StringBuffer buff;
           public TextAreaOutputStream(JTextArea textArea){
             this.textArea = textArea;
             this.buff = new StringBuffer();     
           public void write(int b)throws IOException{
             // this next line is kind of a hatchet job... it works... but still
             buff.append(Character.toString((char)b));
             if(buff.length()>100){
               flush();     
           public void flush()throws IOException{
             this.textArea.append(buff.toString());
             this.buff = new StringBuffer();
           public void close()throws IOException{
             this.textArea = null;
             this.buff = null;
         }So I'd like to launch my process, and direct all output from that process to a Jtextarea? Is there a rough overview anyone can give me as to how this can be done?

  • Issues with using the output redirection character with newer NXOS versions?

    Has anyone seen any issues with using the output redirection character with newer NXOS versions?
    Am receiving "Error 0x40870004 while copying."
    Simply copying a file from bootflash to tftp is ok.
    This occurs for both 3CDaemon and Tftpd32 softwares.
    Have tried it on multiple switches - same issue.
    Any known bugs?
    thanks!
    The following is an example of bad (NXOS4.1.1b) and good (SANOS3.2.1a)
    MDS2# sho ver | inc system
      system:    version 4.1(1b)
      system image file is:    bootflash:///m9200-s2ek9-mz.4.1.1b.bin
      system compile time:     10/7/2008 13:00:00 [10/11/2008 09:52:55]
    MDS2# sh int br > tftp://10.73.54.194
    Trying to connect to tftp server......
    Connection to server Established. Copying Started.....
    TFTP put operation failed:Access violation
    Error 0x40870004 while copying tftp://10.73.54.194/
    MDS2# copy bootflash:cpu_logfile tftp://10.73.54.194
    Trying to connect to tftp server......
    Connection to server Established. Copying Started.....
    |
    TFTP put operation was successful
    MDS2#
    ck-ci9216-001# sho ver | inc system
      system:    version 3.2(1a)
      system image file is:    bootflash:/m9200-ek9-mz.3.2.1a.bin
      system compile time:     9/25/2007 18:00:00 [10/06/2007 06:46:51]
    ck-ci9216-001# sh int br > tftp://10.73.54.194
    Trying to connect to tftp server......
    |
    TFTP put operation was successful

    Please check with new version of TFTPD 32 server. The error may be due to older version of TFPT server, the new version available solved this error. Files are getting uploaded with no issues.
    1. Download tftpd32b.zip from:
    http://tftpd32.jounin.net/tftpd32_download.html
    2. Copy the tftpd32b.zip file into an empty directory and extract it.
    3. Copy the file you want to transver into the directory containing tftpd32.exe.
    4. Run tftpd32.exe from that directory. The "Base Directory" field should show the path to the directory containing the file you want to transfer.
    At this point, the tftpserver is ready to begin serving files. As devices request files, the main tftpd32 window will log the requests.
    Best Regards...

Maybe you are looking for

  • Mac OS 10.9 Maverick -- no "open in new window" option

    Upgraded to the new Mac 10.9 Maverick and now there are no "open folder in new window" option, or at least it doesn't work. Please advise. Thanks!

  • Proper drive modules for a G5 Xserve?

    Hi all, We need up upgrade the drive modules in a G5 Xserve. I checked in the apple store, and the 750 GB SATA modules have this line: "These Serial ATA Apple Drive Modules are qualified for use only with the new Intel-based Xserve. For Xserve RAID o

  • "Pass Through" blending

    How is it possible to achieve blending like "Pass Through" on a group in Photoshop CS2? For example, if in Flash you have a background image and then a Sprite object containing two images. The first image has a blend mode of NORMAL and the second ima

  • Transfered option at Datasouce level at sap BI system

    Hi Experts,      I have enhanced datasource at R/3,i have removed hide option for those enhanced, source code is also working fine but  Datasouce already replicated by some one in sap bi system ,so 3.x  datasource is available in sap bi system. I hav

  • JDeveloper 11, Business Rules availability

    Hello, I'd like to test Business Rules 11 functionalityfor our poject. What I've seen so far in viewlets looks a lot better then the Business 10 version. We are in the process evaluating what Business Rule Engine to take. In JDeveloper 11 I'm not abl