Want to get the output in windows


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Want to get the output in windows
# 1  
Old 06-27-2005
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
# 2  
Old 06-28-2005
Alternative approach.

Output to a file and then view it in windows.

Vino.
# 3  
Old 06-28-2005
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:

Code:
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
# 4  
Old 06-28-2005
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.
# 5  
Old 06-28-2005
Would rsh suit your purpose ? I havnt used it tho' to advice you more on that.

vino
# 6  
Old 06-28-2005
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Programming

Printing Popen Output Using Windows 7

Hi Guys, I am new to python and I am trying to print ouput of Popen on my text screen (tkinter gui). I was able to make it work on Linux with this code: Linux: Working def PrintSomething2(): outputdata = commands.getstatusoutput("sudo fping -f host.list") for i in outputdata:... (2 Replies)
Discussion started by: tattoostreet
2 Replies

2. UNIX for Dummies Questions & Answers

syslog files output to Windows

Hi there, Our syslog servers are unix. The files seems like local6 or somethign. How can I output the file to a file in Windows that I can maninupate? such as choose records that I am interested through the IP or time? Thanks, Margu. (2 Replies)
Discussion started by: margu
2 Replies

3. UNIX for Advanced & Expert Users

Shell output to windows

Good day Guys, I have a problewm in one of my development project. I need to call a SAS job in my script. NO problem with this one, the problem is I need the output (an excel file) to be redirected to a windows server. The destination server is called pcfileserver. I dont know how to redirect... (2 Replies)
Discussion started by: sasia
2 Replies

4. HP-UX

to put the unix script output on windows desktop

Hi could you pls guide a to automate that unix script output is avaialble on desktop.i can FTP and then download but i want to automate it. rgds (1 Reply)
Discussion started by: Assassin
1 Replies

5. Shell Programming and Scripting

get the output of unix script in windows

Hai Actually I work on CVS, where the server is in UNIX and the front end(client) is windows. Now I want to run a script in unix and get the output(report) in windows. Can anyone help me in this as to how i can connect to dos..... Thanks (1 Reply)
Discussion started by: csrope
1 Replies
Login or Register to Ask a Question