Want to get the output in windows

Hai

    I want to run a script in unix and send the outptut to windows. As all the related files are in unix i can't run the script in windows.
    
    Actually my work is related to CVS, so I don't have much knowledge about unix but i have a general idea.

Thanks,
csrope

Alternative approach.

Output to a file and then view it in windows.

Vino.

Sending the output "directly" to a windows process, without an intermittent file lke Vino already suggested, is hard to do. You will have to create some form of network communication over which to transport the information and would have to build some sender/listener on the windoze und the Unix side respectively. It would have to be a background process, to allow for the running script to continue while it listens/sends.

While this is not impossible the solution suggested by Vino seems far easier to implement. To achieve a pseudo-communication you could poll for that file and read only the lpart of the file you haven't processed yet. The general layout would look like:

while : ; do
     while [ -z "$(unprocessed_message)" ] ; do
           unprocessed_message="$(get_unprocessed_msg_somehow)"
          sleep 1
     done

     case $unprocessed_message in
          variant1)
               process_first_possible_message
               ;;

          variant2)
               process_second_possible_message
               ;;

          ...


          *)
               print - "unintelligible message encountered"
               ;;

     esac

     unprocessed_message=""     # reset msg after processing

done

The function get_unprocessed_message would somehow extract from the newly transferred output-file everything which hasn't been processed by the script already. For instance you could write every processed line to a "processed"-file and run "diff" (man diff) over it to get lines not already processed.

Hope this helps

bakunin

Thanks and sorry bakunin ......

I think my question is not clear.......
From windows if i give the name of the folder it should give me (my required result) result back to windows by running the script in unix.
Till now I was sending the output to one file and retrieving the output file manually from windows.
I don't have any problem even if the result is repeated if run for the next time.........

 Vino........thanks for the advice but till now i was doing the same, but i want to do it from windows itself.

Would rsh suit your purpose ? I havnt used it tho' to advice you more on that.

vino

If your unix box run a http deamod, move your script to cgi-bin directory. Once you want start the script, just access unix host by a URL string, then the script can return a text page or a html page, it is up to your script.
BTW: It is better adding ACL control for this URL.