Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to execute command on Unix though Windows bat file

Status
Not open for further replies.

nguyenvandong

IS-IT--Management
May 14, 2002
18
CH
Hi all,

I have problem and looking for a while without solution; want to use a windows script file (bat file) to login into unix box and execute some command to run an application on unix , for exemple...

Please is anybody knows/did such a similar things or provide links for that?

Many thanks for support,

Ely.

 
You could have the job already running on the Unix server in a wait loop looking for a "handshake" file which you transfer from the Windows server.


Ged Jones

Top man
 
Ged,

I've done that in the past but had the odd spot of bother when the wait loop process dies for some reason or other.

The way I do it now is to run a very lightweight shell script every minute using cron; then, when the handshake file appears, run the main script or program.

The disadvantage of this approach is that you have the overhead of running something every minute, which is why I make sure it's very lightweight. Mike
________________________________________________________________

"Experience is the comb that Nature gives us, after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
Thanks for the clue; please can you show me how to do that? a sample or else? I have no idea where to start.

Many thanks,

Ely.
 
use rsh command this will let you run a job on unix from you bat file. Use also rcp command to retrieve anu file generated by your unix program

rsh = remote shell
rcp = remote copy

have those programs installed on you pc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top