From: rodmur@ecst.csuchico.edu (Dale Harris)
Newsgroups: alt.sources
Subject: wxmap-1.1 (shell script to download weather pictures)
Date: 7 Nov 92 03:57:27 GMT
Organization: California State University, Chico
NNTP-Posting-Host: caustic.ecst.csuchico.edu

This is a script I made to download the weather satellite pictures from 
vmd.cso.uiuc.edu

#---------------------------------- cut here ----------------------------------
# This is a shell archive.  Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by Dale Harris <rodmur@caustic> on Fri Nov  6 19:52:06 1992
#
# This archive contains:
#	wxmap	
#
# Existing files will not be overwritten.
# Error checking via wc(1) will be performed.
# Error checking via sum(1) will be performed.
# Files are compressed using compress(1).

LANG=""; export LANG
PATH=/bin:/usr/bin:$PATH; export PATH

if sum -r </dev/null >/dev/null 2>&1
then
	sumopt='-r'
else
	sumopt=''
fi

if test -f wxmap
then
	echo Ok to overwrite existing file wxmap\?
	read answer
	case "$answer" in
	[yY]*)	echo Proceeding;;
	*)	echo Aborting; exit 1;;
	esac
	rm -f wxmap
	if test -f wxmap
	then
		echo Error: could not remove wxmap, aborting
		exit 1
	fi
fi

rm -f /tmp/uud$$
(echo "begin 666 /tmp/uud$$\n#;VL*n#6%@x\n \nend" | uudecode) >/dev/null 2>&1
if [ X"`cat /tmp/uud$$ 2>&1`" = Xok ]
then
	unpacker=uudecode
else
	echo Compiling unpacker for non-ascii files
	pwd=`pwd`; cd /tmp
	cat >unpack$$.c <<'EOF'
#include <stdio.h>
#define C (*p++ - ' ' & 077)
main()
{
	int n;
	char buf[128], *p, a,b;

	scanf("begin %o ", &n);
	gets(buf);

	if (freopen(buf, "w", stdout) == NULL) {
		perror(buf);
		exit(1);
	}

	while (gets(p=buf) && (n=C)) {
		while (n>0) {
			a = C;
			if (n-- > 0) putchar(a << 2 | (b=C) >> 4);
			if (n-- > 0) putchar(b << 4 | (a=C) >> 2);
			if (n-- > 0) putchar(a << 6 | C);
		}
	}
	exit(0);
}
EOF
	cc -o unpack$$ unpack$$.c
	r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9J1AO1 =9-P="X
MT5D9H4$2D52C@1$MD 9RR)+J=P8ZL *EUP?OY41%D$A"M!G+5F,NX989")>^X
M!WU_,9<+J3<D,$=U]%Z%)%(E*8-OZ)HTQ)+<UP8ZT'O=AS 7\IP4)@)-IP#^X
$.'<* )<+                                                    X
                                                             X
end
@eof
uncompress <wxmap >/tmp/compress$$
mv /tmp/compress$$ wxmap
set `sum $sumopt <wxmap`; if test $1 -ne 50352
then
	echo ERROR: wxmap checksum is $1 should be 50352
fi
set `wc -lwc <wxmap`
if test $1$2$3 != 2008575197
then
	echo ERROR: wc results of wxmap are $* should be 200 857 5197
fi

chmod 755 wxmap

rm -f /tmp/unpack$$
exit 0
-- 
   __        _                     Dale A. Harris  {rodmur@ecst.csuchico.edu} 
  /  )      //                           /   "Is gone... he left for Mexico to
 /  / __.  // _      , , , __.  _       /_  _  __  _  get a job, due to the
/__/_(_/|_</_</_    (_(_/_(_/|_/_)_    / /_</_/ (_</_ deterioting US economy ;)




Newsgroups: rec.windsurfing