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

Running a script from an FTP command

Status
Not open for further replies.

cybercop23

IS-IT--Management
Aug 12, 2001
103
US
Does anyone know a way to execute a shell script on an AIX box using the FTP quote command?
What I need to do is send a script file to a remote location (script changes regularily), execute it, and then get back the output file that is created.
When I try to run a script using the quote command, it tells me that "RUNIT" command can not be sent.
I'm using: quote runnit. Note that somehow the error returns my scrip's name ALL in upper case.

This will be done from a WIN2K machine going to an RS600/AIX box.

Any help/suggestions will me much appreciated.

Thanks
 
one way around this problem would be to send a temp file along with your script. set up a cron job on the remote system to look for the temp file as frequently as needed.
when the cron job finds the temp file have it delete the temp file and run your updated script.
 
mkhsys, I'm trying to do this without the AIX admin knowing about. Setting up a cron job, would mean that I have to get him involved. That's why I was thinking about using FTP. How about using .netrc? Would that work?

Thanks again for your help.
 
Why wouldn't you want the AIX admin to know about this? That is unless your intentions are for evil purposes. (Sorry I don't mean to affend) With that said, Do you have login rights to this machine ?

You don't have to be root to setup a cron job. This can be done by a regular user.
-Danny
techie@snoboarder.net






 
It is just alot of paper pushing to get the ADMIN to set it up. I do have login rights and I could set up a cron job, however that will limit me to the times I can send out the scripts.
If I need something right away, I need to wait until the next time the cron runs. It can run every hour on the hour.

But, if I'm using a FTP script from my desktop machine to send out all the scripts on demand, then why can't I just run them using the "quote" command?
Just trying to keep things simple.
 
The best way to approach this might be to get your sysadmin's agreement to use rexec. 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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top