[Israel.pm] web-based script

Anatoly Vorobey mellon at pobox.com
Tue Aug 31 02:39:00 PDT 2004


You wrote on Tue, Aug 31, 2004 at 12:19:21PM +0300:
> 	[in the browser]
> 	* goto url x.y.z
> 	* login (username+password) [1]
> 	<new page>
> 	* select a radio button
> 	* select another radio button
> 	* hit submit

POST or wget from shell, LWP from perl. If auth is apache-based (Basic 
HTTP auth), you can probably skip the login part and just send the 
credentials when you simulate form submit.

> 	<wait for a download of a HUGE (over 100 mg) file>
> 	[in the shell prompt]
> 	* run a script on the downloaded file
> 	<new file produced>
> 	* copy the new file to some directory

system() from perl or just run everything from a shell script. I don't 
really see a need for perl so far.

> 	* synchronize the directory with its mirror on another server

rsync.

> 	* run another script that compiles something out of the file
> 	<after a few hours of processing a new file is created>
> 	* sftp the file to server A
> 	* ssh to server C
> 	* ssh from C to server B
> 	* sftp from server B to server A and get the new file
> 	* chmod the file on server B as it should be

Call sftp from the shell script. Call ssh from the shell script with 
another shell script name on the command line. That script resides on C 
and has an ssh invocation with the name of another script on B. The 
script on B does the sftp and chmod. Or you can combine it all in one 
ungainly command line in the original script, I guess (if you get the 
escaping right).

-- 
avva
"There's nothing simply good, nor ill alone" -- John Donne




More information about the Perl mailing list