Does anyone have the source for a PD cp?

Darryl P. Wagoner dpw at rayssd.UUCP
Sat Jul 5 14:27:54 AEST 1986


> Summary: You kidding?
> 
> > Does anyone have the source code for a Public Domain cp?  I'm wanting to
> > write one for my IBM AT to compile and use under DOS, but I don't have the
> > slightest idea how to do it right.  Thanks in advance.
> 
> Egad!  You don't have a degree in computer science, do you? 
> 
> Ok...
> 
> open first file (checking for errors ... bailout if necessary)
> creat second file (checking for errors ... bailout if necessary)
> while (read a buffer from first file) is greater than 0,
> 	write a buffer to second file (check for errors..)
> exit

That will not work if you have something like "cp file1 [file2 ...] target".
Althought I have to admit that even that is not too complex.  Since that
cp comes with unix I gather that the requester wants something more that 
just cp.  As in 4.2 BSD cp that has the -r option.  

Don't mind me it late and I am tried.


-- 
	Darryl Wagoner
	Raytheon Co.; Portsmouth RI; (401)-847-8000 x4089

best path             {allegra|gatech|mirror|raybed2}  ---------\
next best             {linus|ihnp4|pyrbos} ---------------------->!rayssd!dpw
if all else fails     {brunix|cci632} -------------------------/



More information about the Comp.unix mailing list