home *** CD-ROM | disk | FTP | other *** search
- #! /bin/csh -f
- # fetch and open a recent weather map files from vmd.cso.uiuc.edu:wx/...
- # do:
- # getGif 3 CV for satellite photos
- # getGif 3 SA for surface/radar photos
- #
- set n = $1 ; shift
- set m = 128.174.5.98 # vmd.cso.uiuc.edu
- set p = wx
- set t = /tmp/W_maps
- mkdirs $t
- cd $t
-
- ftp -i -n $m > list <<eof
- user anonymous guest
- cd $p
- ls $1*
- quit
- eof
-
- set f = `tail -$n list`
-
- ftp -i -n $m <<eof
- user anonymous guest
- cd $p
- bin
- mget $f
- quit
- eof
-
- # make sure we got something
- foreach i ($f)
- test -s $i
- if ($status) then
- echo "Couldn't get weather map $i" | open
- exit
- else
- end
-
- # rename ...GIF => ...gif
- set o = ""
- foreach i ($f)
- set ff = $i:r.gif
- mv $i $ff
- set o = ($o $ff)
- end
-
- open $o
-