[comp.sources.wanted] Trying to find bftp

markr@phx.mcd.mot.com (Mark Rennebaum) (06/04/91)

     Has anyone seen or heard of Public Domain sources for bftp (a kind of 
"batch" ftp) that runs under Unix system V?

     Also, does anyone have the FTP protocol specs rfc959 or rfc1068?  I 
would (in the event that bftp cannot be found) like to write a C program 
that talks to TCP-IP that mimics FTP.  Has this application been done before?
Are there sources for this?

     Thanks for any information provided.  Please get in touch with me via
e-mail. 

Dan_Jacobson@ATT.COM (06/07/91)

>>>>> "Mark" == Mark Rennebaum <markr@phx.mcd.mot.com> writes:

Mark>      Has anyone seen or heard of Public Domain sources for bftp
Mark> (a kind of "batch" ftp) that runs under Unix system V?

Mark>      Also, does anyone have the FTP protocol specs rfc959 or
Mark> rfc1068?  I would (in the event that bftp cannot be found) like
Mark> to write a C program that talks to TCP-IP that mimics FTP.  Has
Mark> this application been done before?  Are there sources for this?

I kill 1 1/3 birds with one stone... shouldn't be too far from Sys V too.

ftp=ftp #(mine was called "pftp" --DJ)
#From: sahayman@iuvax.cs.indiana.edu (Steve Hayman)
#Newsgroups: alt.sources
#Subject: retrieve RFC's automatically from uunet
#Date: 11 Apr 91 22:22:30 GMT
#Organization: Computer Science, Indiana University
#
#I find this little script handy, it retrieves RFC's automatically
#from uunet via anonymous ftp and sticks them on stdout.
#So, instead of keeping your own little collection of RFCs
#hidden away somewhere and forgetting what directory you
#put them in, you can just use
#
#% rfc index | more
#% rfc 1217 | lpr	(A personal favourite. Get this one. It's funny.)

#!/bin/sh
# rfc NNN
# retrieve rfc NNN from uunet, put it on stdout
# assumes rfc's are in uunet:/rfc/rfcNNNN.Z
#
# Actually the uunet people would prefer it if you ftp'd things
# from 'ftp.uu.net', so we retrieve things from that machine.
#
# uunet conveniently has files called "index" and "rfc-index"
# in the /rfc directory, so this script will also let you
# retrieve those.
#
# sahayman
# 1991 04 10


PATH=/usr/local/bin:/usr/ucb:/bin:usr/bin export PATH

# a little hack so that we can say "rfc index" or "rfc rfc-index"
# as well as "rfc 822"

case "$1" in
"")		echo "$0: Usage $0 [NNN] [index] [rfc-index]" 1>&2; exit 1 ;;
[0123456789]*)	file=rfc$1.Z ;;
*)		file=$1.Z ;;
esac

${ftp?} -n ftp.uu.net <<EOF
user anonymous $USER@`hostname`
binary
get rfc/$file "|uncompress -c"
EOF