#!/bin/csh -f # # ftp to a remote system... # J.Brewer, Jan.99 # if ($#argv != 3 || $1 == '-h') then echo usage: $0 CCD_number yymmdd epu_password exit(-1) endif # Check whether there are sufficient files... set files = `ls *$2*.ps *$2*.txt *$2*.tab` set num = `echo $files | wc -w` if ($num != 9) then echo ">>> You have "$num" files instead of 9. These are:" echo ">>> "$files echo -n "Continue anyway? (y/n) " set reply = $< if ($reply == 'n' || $reply == 'N') then exit (-1) endif endif # Determine remote directory... set dir = null if($1 == '1' || $1 == '01') then set dir = CCDs/01/Data_ST endif if($1 == '33') then set dir = CCDs/33/Data_ST endif if($1 == '39') then set dir = CCDs/39/Data_ST endif if ($dir == 'null') then echo "Unrecognized CCD..." exit(-1) endif echo "Transferring data to epu..." set ext = ` date | cut -c5-10,24-28 | tr ' ' '_' ` /usr/bin/ftp -i -v -n >> /tmp/ftplog.$ext <