ECHO in SOLARIS.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    ECHO in SOLARIS.

    I think the SOLARIS is same like UNIX.

    thier basic fundas r same to same.

    echo means it prints a specific given message.
    if that process is not opened in a seperate window ... that means run in background ......... then where it prints?????

    is there any predefined output stream for this case?????

    i think .... the all experts could understand my Q.
    a project-part (important) is stopped for this.
    i tried in google but failed.
    so.......Plz help.

    kind regards.
    dmjpro.
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    Originally posted by dmjpro
    I think the SOLARIS is same like UNIX.

    thier basic fundas r same to same.

    echo means it prints a specific given message.
    if that process is not opened in a seperate window ... that means run in background ......... then where it prints?????

    is there any predefined output stream for this case?????

    i think .... the all experts could understand my Q.
    a project-part (important) is stopped for this.
    i tried in google but failed.
    so.......Plz help.

    kind regards.
    dmjpro.
    Echo just prints to the current window. It prints to standard output unless otherwise defined (pipe or redirect), as far as I know.

    Comment

    • drhowarddrfine
      Recognized Expert Expert
      • Sep 2006
      • 7434

      #3
      Everything is sent to the standard output by default. This would be the screen unless redirected.

      Comment

      • dmjpro
        Top Contributor
        • Jan 2007
        • 2476

        #4
        both of u many many thanx ....

        i know that but i want that prticular stream.
        actually what happens ............ i start a process using JAVA and the no seperate window opened for it.
        and it echos lot of messages and takes long time to end.
        right now ... my process stops responding but still active whenever i see the process status using PS command.

        can't i define that stream by myself????????

        so experts plz help.
        it ll be very fantastic thing if that stream is handled by me.

        kind regards.
        dmjpro.

        Comment

        • sicarie
          Recognized Expert Specialist
          • Nov 2006
          • 4677

          #5
          Originally posted by dmjpro
          both of u many many thanx ....

          i know that but i want that prticular stream.
          actually what happens ............ i start a process using JAVA and the no seperate window opened for it.
          and it echos lot of messages and takes long time to end.
          right now ... my process stops responding but still active whenever i see the process status using PS command.

          can't i define that stream by myself????????

          so experts plz help.
          it ll be very fantastic thing if that stream is handled by me.

          kind regards.
          dmjpro.
          Hmm, I believe this would be better for the JAVA forum as soon as you describe your implementation - what is the line you are using to start the process in Java?

          In a blunt and brute force way (non-elegant), you could pipe the output to a file, and then read that file in from your Java program, but I'm betting there is a better (more elegant) way.

          Comment

          • Motoma
            Recognized Expert Specialist
            • Jan 2007
            • 3236

            #6
            You could try changing the STDOUT stream in Java. This would cause your echos to go elsewhere (or be handled internally). Or you could try redirecting the output. If this is your own program, just change the echos to something else, perhaps some error handling?

            Comment

            • dmjpro
              Top Contributor
              • Jan 2007
              • 2476

              #7
              as per as sicarie needs concern i sending u the line by which the process is started.

              Runtime.getRunt ime().exec("pro cess_string");

              what happens now ... after some times (near about 30-45 secs) the process stops responding.
              but the process shown as still active.
              when i see using PS command.

              now if i start a process having a script which ll do only sleep for 10 mins.
              it has no echos.
              that runs properly .... it ends up after 10 mins.

              plz help.
              i ll be gratefull to u experts of UNIX and JAVA if any one help me out.

              kind regards.
              dmjpro.

              Comment

              Working...