[7379] in Athena Bugs

home help back first fref pref prev next nref lref last post

shar fails on known file

daemon@ATHENA.MIT.EDU (geer@ATHENA.MIT.EDU)
Sun Mar 31 22:19:00 1991

From: geer@ATHENA.MIT.EDU
Date: Sun, 31 Mar 91 22:18:45 -0500
To: bugs@ATHENA.MIT.EDU
Cc: geer@ATHENA.MIT.EDU



WHAT'S WRONG

        ``shar'' fails on known file, writing nonworkable shell script.

ENVIRONMENT

	e40-008-11
	Athena 4.3BSD UNIX #7-2-2 (mar@Toto:DIALUP.VAX) Wed Jan 30 ...
	/mit/watchmaker/vaxbin/shar

REPEAT BY

	e40-008-11% cd /tmp
        e40-008-11% attach rfc
	e40-008-11% shar /mit/rfc/RFC1113.TXT >! foo
	e40-008-11% sh foo
	e40-008-11% sh foobar
	foobar: syntax error at line 1930: `end of file' unexpected

DISCUSSION

        What is happening is that the resultant shell script begins:

		....
		sed "s/^X//" >'/mit/rfc/RFC1113.TXT' <<'END_OF_FILE'
		....

	when the bottom of the file looks like this:

		....
		XEND_OF_FILE
		....

	which is to say that the failure of the two to match results
	in a non-workable shell extraction.  Further research should
	easily determine which end of this is wrong.

--dan


home help back first fref pref prev next nref lref last post