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

Remote Execute Shell Script from NT

Status
Not open for further replies.

UCF87

Technical User
Feb 13, 2003
44
US
Anyone know how to remote execute an AIX script from a NT box besides using RSH?

Thanks
 
If you can login remotely to the AIX server, then your .profile script in the home directory could execute a script and then exit eg:

PATH=:/runtime:/runtime/scripts:/bin:/usr/bin:/etc:/usr/local:/usr/ucb
PRINT=/usr/local/print.sl
TERM=vt220
APPLOG=/data/logfiles/application_errs.log
PS1='$USER'" on "`hostname`": "'$PWD'" > "
export PATH PRINT TERM PS1
umask 011
set -o vi
if [ -s "$MAIL" ] # This is at Shell startup. In normal
then echo "$MAILMSG" # operation, the Shell checks
fi # periodically.
# execute a script and finish
your_script Dickie Bird (:)-)))
 
I have used command like this:
rsh <hostname> -l <username> -n <myscript> %var1% %var2%
It works ok even in a bat script.
 
You could ftp a 'trigger' file to the unix server which is running a background process (daemon) which spends most of its time sleeping until the trigger file is detected. The daemon then invokes your script, waits for it to finish, removes the trigger file and then goes back to sleep until the next time.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top