jpeters
  
 
  
 
 
Group: Members 
Posts: 804 
Joined: April 2006 | 
  | 
Posted: Nov. 18 2007,21:30 | 
   | 
 
 
  
I just discovered a much faster way of doing routines like updating web  pages, etc., using automated scripts.  First, setup .netrc with user name, password:
  example:  01 machine mysite.net login xxxxx password xxxxxxx
  Now write your routine to a  file. Common commands include cd, send, get, bye:
  example, ftp_script:
  cd /mypath/file get file bye
  To run, type" ftp mysite.net < ftp_script" and the task is performed within seconds.  The script can be run within a larger script, for example, that opens amaya.uci to the file you just ftp'd over.  Very fast!!!
  example:
     #!/bin/bash      ftp mysite.net < get_index      [ -d  /opt/amaya ] || mydsl-load /mnt/hda3/Downloads/amaya.uci          /opt/amaya/wx/bin/amaya index.htm & 
 |