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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NT to UNIX Application

Status
Not open for further replies.

fdsouth

Technical User
Jun 6, 2001
61
US
I have written 2 applications that I need some help with. One was written using ANSI C and compiled on an SGI UNIX Workstation. The other was written in MS VC++ and compiled for use on an NT network. Here's my question:

I need the NT application to make a call through the network and execute the UNIX application. We have NFS mounted the UNIX workstation to the NT network, but I'm not sure how to execute the call. I am new at cross-platform programming so I don't know what is required.

Any help would be greatly appreciated - especially code examples:)
 
What about "server" application rem_sh.sh, running on Unix side and waiting for my_prog.sh with commands to execute:

NT side:
--------------------------- rem_sh.cpp
#include <stdlib.h>

int main(void)
{
system(&quot;ftp -s:rem_sh.ftp unix_host.my_domain.com&quot;);

return(0);
}
---------------------------

--------------------------- rem_sh.ftp
my_user
my_password
asc
put my_prog.sh
bye
---------------------------

--------- my_prog.sh - commands you need to execute on unix
my_prog
---------------------------

Unix side:
--------------------------- rem_sh.sh
while true; do
if test -a my_prog.sh; then
chmod 777 my_prog.sh
my_prog.sh
rm my_prog.sh -f
fi
done
---------------------------
 
correction:
add &quot;sleep 1&quot; to rem_sh.sh before &quot;fi&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top