DSPLIT - splitting files over multiple floppies (Unix PC)

Craig Johnson vince at tc.fluke.COM
Fri Sep 8 09:34:59 AEST 1989


In article <2842 at cbnewsc.ATT.COM>, cmv at cbnewsc.ATT.COM (C M Votava) writes:
> I posted the source for this program a while ago in unix-pc.sources, and
> didn't get any response. I suspect the article may have had some trouble
> getting out to the net. So I'm re-posting the announcement here, and if
> I get enough interest from folks wanting a copy, I'll try to re-post the
> source again.
> ===========================================================================
> Have you ever wished for a program that would break up big files and write
> them to multiple floppies in a single stroke? Don't you *HATE* to sit there
> and feed floppies to your unixpc all day just to back up the silly hard
> disk? Well maybe this little program that I have can help you out some.
> 
> I have a program called dsplit (for device split). It takes standard input
> and writes to the floppy; when the floppy is full, it prompts you for another
> floppy, and continues on (similar to the unixpc "cpio" command) until you're
> finished. I've written it on and for the unixpc, but it should compile on
> other machines without much trouble.

Craig Votava's dsplit sounded vaguely familiar to me, so a scrounged
around a bit and found the following two scripts which were first posted
by Corey Satten four years ago.  These should perform the same functions
as dsplit.  Give them a try and see how you like them.

----------------------------- Shar archive follows ------------------------
# 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 fluke!vince on Thu Sep  7 16:25:24 PDT 1989
# Contents:  fread fwrite
 
echo x - fread
sed 's/^@//' > "fread" <<'@//E*O*F fread//'
: '  
:  Read as many Unix-PC floppy disks to standard output as are needed
:  to satisfy the program reading them. (such as tar or cpio.)
:
:  Sample usage: fread | uncompress | tar xvf -
:
:  Author: Corey Satten, fluke!corey Aug. 1985
:  This software is hereby declared totally public domain.
: '
trap "/etc/dismount -f 2>/dev/null 1>&2; exit 0" 0
trap "/etc/dismount -f 1>&2; exit 1" 1 2 13 15
diskno=1
while dd if=/dev/rfp021 ibs=4096 count=79 2>/dev/null ;do
    /etc/dismount -f 1>&2
    diskno=`expr $diskno + 1`   
    echo "To EXIT -- press <E> followed by <RETURN>." 1>&2
    echo "To continue - insert floppy disk #$diskno and press the <RETURN> key." 1>&2
    choice=`head -1 </dev/tty`
    case "$choice" in
	E*|e*) exit 1;;
    esac
done
@//E*O*F fread//
chmod u=rw,g=rw,o=rw fread
 
echo x - fwrite
sed 's/^@//' > "fwrite" <<'@//E*O*F fwrite//'
: '  
:  Copy standard input onto as many Unix-PC floppy disks as needed,
:  buffering appropriately, and prompting the user to change as necessary.
:
:  Sample usage: tar cvf - . | compress | fwrite
:
:  Author: Corey Satten, fluke!corey Aug. 1985
:  This software is hereby declared totally public domain.
: '

trap "/etc/dismount -f 1>&2; exit 1" 1 2 13 15
diskno=1
go=true
while $go ;do
    set `dd of=/dev/rfp021 obs=4096 count=632 2>&1`
    if test $1 = 632+0 ;then
	/etc/dismount -f 1>&2
	diskno=`expr $diskno + 1`   
	echo "To EXIT -- press <E> followed by <RETURN>." 1>&2
	echo "To continue - insert floppy disk #$diskno and press the <RETURN> key." 1>&2
	choice=`head -1 </dev/tty`
	case "$choice" in
	    E*|e*) exit 1;;
	esac
    else
	/etc/dismount -f 2>/dev/null 1>&2
	go=false
    fi
done
@//E*O*F fwrite//
chmod u=rw,g=rw,o=rw fwrite
 
exit 0
------------------------------ End of shar archive --------------------------

By the way, Corey can no longer be reached at the enclosed address.  If
anyone wishes to correspond with him contact me and I'll be glad to give
you his new address.

	Craig V. Johnson		...!fluke!vince
	John Fluke Mfg. Co.
	Everett, WA



More information about the Comp.sys.att mailing list