Subject: bin/13798: uudecode should support concatenated uuencoded files
To: None <>
From: None <>
List: netbsd-bugs
Date: 08/28/2001 00:33:06
>Number:         13798
>Category:       bin
>Synopsis:       uudecode cannot handle concatenated uuencoded files
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 27 15:29:00 PDT 2001
>Originator:     Anders Dinsen
>Release:        1.5
Anders Dinsen
System: NetBSD kvik 1.5 NetBSD 1.5 (KVIK) #4: Mon Jun 18 10:49:51 CEST 2001 anders@kvik:/amd/box/usr/src/sys/arch/i386/compile/KVIK i386

	It is sometimes desirable to concatenate many uuencoded files
	into one (e.g. when saving them from a news reader).
	uudecode will, however, only decode the first file and ignore
	the rest.
	Concatenate two uuencoded files into one:

	uuencode mysh < /bin/sh > shells.uue
	uuencode mycsh < /bin/csh >> shells.uue

	Then try to decode them (unpack):

	uudecode shells.uue

	Watch that only mysh is created.
	Apply this patch to /usr/src/usr.bin/uudecode/uuencode.c which
	introduces an ``-m'' option which tells uudecode to continue
	searching for another file when a file has been decoded: (193 lines)

	(Sorry, there is no patch for the man-page).

	With that patch applied, the following command creates both
	files in the above case:

	uudecode -m shells.uue

	Watch that both mysh and mycsh are created.

	Naming the option ``-m'' may be a bad idea, since I see that
	some other implementations of uuencode produces MIME encoded
	files when that option is given. I just couldn't think of a
	good alternative.