[comp.sys.amiga.misc] "-----" in comp.sources.amiga posting headers deprecated

xanthian@zorch.SF-Bay.ORG (Kent Paul Dolan) (03/06/91)

Folks who are wrapping up shar files for the comp.sources.amiga
moderator are requested to desist underling paragraph headings in the
introductory material with rows of dashes.  The result is decorative
as all get out, but it breaks stuff.

In particular, this confuses standard Unix "unshar" software (which
mistakes it for a "cut" line, and then tries to execute the next line as
sh commands), defeats automatic unpacking, and necessitates hand
editing to unpack the files, a minor, but unnecessary, annoyance.

Many thanks.

(The most recent example is "buttonask".)


                                                           /// It's Amiga
                                                          /// for me:  why
Kent, the man from xanth.                             \\\///   settle for
<xanthian@Zorch.SF-Bay.ORG> <xanthian@well.sf.ca.us>   \XX/  anything less?
--
Convener, COMPLETED comp.sys.amiga grand reorganization.

kherron@ms.uky.edu (Kenneth Herron) (03/07/91)

xanthian@zorch.SF-Bay.ORG (Kent Paul Dolan) writes:

>Folks who are wrapping up shar files for the comp.sources.amiga
>moderator are requested to desist underling paragraph headings in the
>introductory material with rows of dashes. 

>In particular, this confuses standard Unix "unshar" software (which
>mistakes it for a "cut" line, and then tries to execute the next line as
>sh commands), defeats automatic unpacking, and necessitates hand
>editing to unpack the files, a minor, but unnecessary, annoyance.

Unshar is not a standard part of unix, and if it's confusing the contents 
with the wrapper it's broken.  I don't see why the people creating these
files should have to allow for broken software.

If you're unpacking on unix, you can always pipe the shar file to sh;
that's the original idea behind shar files anyway.  And yes, I realize
that this is a security risk.
-- 
Kenneth Herron                                            kherron@ms.uky.edu
University of Kentucky                                        (606) 257-2975
Department of Mathematics 
                                "Never trust gimmicky gadgets" -- the Doctor

farren@sat.com (Michael J. Farren) (03/08/91)

kherron@ms.uky.edu writes:
>Unshar is not a standard part of unix, and if it's confusing the contents 
>with the wrapper it's broken.  I don't see why the people creating these
>files should have to allow for broken software.

It's not broken.  It's the same situation as if you had an executable file
in your local directory named "sed" which just happened to play The Star
Spangled Banner on your line printer when invoked.  If such were the case,
even "sh <sharfile>" wouldn't work properly, now would it?

True, unshar is not a standard Unix utility.  The "shar" format, however,
has been around a long time now, and has evolved a fairly consistent
structure and standard.  One of the elements of that standard is that
the first line which consists of a line of hyphens is always the "cut here"
line, below which everything is part of the actual shell script which makes
up a shar.

>If you're unpacking on unix, you can always pipe the shar file to sh;

Hell, you don't even need to do that.  Just "sh <filename>" works just fine.
But before you can do that, you need to edit the file, to eliminate the
header information that's tacked on by its passage through the Net.  The
real utility of "unshar" lies in the fact that you don't need to do that
with "unshar" - just "unshar <filename>" and it's all taken care of for you.
Easy, quick, nice - except when it can't work, because people didn't realize
that there were such utilities out there.  With a little luck, they'll start
avoiding long lines of hyphens at the beginnng of the line, and all of our
troubles will be over :-)
-- 
+-----------------------------------------------------------------------+
| Michael J. Farren                                      farren@sat.com |
|                        He's moody, but he's cute.                     |
+-----------------------------------------------------------------------+

david@twg.com (David S. Herron) (03/08/91)

In article <kherron.668278296@s.ms.uky.edu> kherron@ms.uky.edu (Kenneth Herron) writes:
>xanthian@zorch.SF-Bay.ORG (Kent Paul Dolan) writes:
...
>>In particular, this confuses standard Unix "unshar" software (which
>>mistakes it for a "cut" line, and then tries to execute the next line as
>>sh commands), defeats automatic unpacking, and necessitates hand
>>editing to unpack the files, a minor, but unnecessary, annoyance.
...
>Unshar is not a standard part of unix, and if it's confusing the contents 
...
>If you're unpacking on unix, you can always pipe the shar file to sh;
>that's the original idea behind shar files anyway.  And yes, I realize
>that this is a security risk.

Ahem..

Piping the file to /bin/sh doesn't work because /bin/sh usually gets
really confused with all the non-/bin/sh stuff (y'know, Header:
lines and that witty commentary at the beginning..)

The Unix 'unshar' program reads down into the file until it
finds something looking like the beginning of an archive.  That
includes cut lines like Kent talks about or "#!" lines or etc..

I *know* that I installed that program at ms.uky.edu long ago.
It's possible that someone later on deleted it ...

Oh, BTW, Hi Kenny!


(And don't tell me you throw away that useful commentary at the beginning?
Shame!  How else do you know who to blame on that cheap PD software!?)


	David


-- 
<- David Herron, an MMDF & WIN/MHS guy, <david@twg.com>
<- Formerly: David Herron -- NonResident E-Mail Hack <david@ms.uky.edu>
<-
<- "MS-DOS? Where we're going we don't need MS-DOS." --Back To The Future

blgardne@javelin.es.com (Blaine Gardner) (03/09/91)

david@twg.com (David S. Herron) writes:
[ ---- vs. unshar vs. sh  deleted]

Doesn't anyone else use Fred Walter's "newsbreak" program? just save all
the parts of a binaries or sources posting to a directory as individual
files (filename is irrelevant) and run newsbreak. It creates
subdirectories for each program, copies the parts to the directory,
unshars, cats and uudecodes them as necessary. It beats the heck out of
both sh and unshar, and has successfully extracted everything I've seen
posted to both program groups. 

Newsbreak is available on ab20 as:
Tue  18-Dec-90  01:40:30     8614  usenet/comp.sources.misc/volume15/newsbreak1.11/part01.Z
-- 
Blaine Gardner @ Evans & Sutherland  580 Arapeen Drive, SLC, Utah 84108
blgardne@javelin.sim.es.com     or    ...dsd.es.com!javelin!blgardne
DoD #0046   My other motorcycle is a Quadracer.         BIX: blaine_g
  Anticipation, anticipation, is making me late, is keeping me waiting.

xanthian@zorch.SF-Bay.ORG (Kent Paul Dolan) (03/13/91)

david@twg.com (David S. Herron) writes:


> (And don't tell me you throw away that useful commentary at the
> beginning? Shame! How else do you know who to blame on that cheap PD
> software!?)

Nope; I always save that and pack it away as POSTER.sources or
POSTER.binaries (or occasionally POSTER.archive); at least 90% of my
800meg or so of USENet archives can be traced back to the originator by
a saved header file.

I get help doing this; the "unshar" here is especially nice; it takes
the part _above_ what it identifies at the shar file, and saves it as
<filename>.hdr.  The unshar I use on the Amiga doesn't do that, so I
almost always unpack stuff on the Unix box.

Of course, unshar does that for all 50 files in a distribution, so I get
to rename the first one and throw away the other 49, but unshar is still
a big time saver; as opposed to editing the s01 - s50 files I saved out
of comp.sources.amiga that makeup the GeeWhiz! distribution one by one,
saving the shar files and cutting off the headers, a process that can
easily take an hour on a slow system, I just say

	(unshar s?? > ../geewhiz.log) >& /dev/null &

and the stuff unpacks in the background silently, saving a log I can read
to check for unpacking errors, while I go on about my assigned task to
post more news articles than anyone in the world.  ;-)

Now if the unshar were only smart enough to peel of the .signatures from
the bottom of the article after the shar file and save that appended to
the .hdr file.... Oh, well, it's an imperfect universe at best.

Kent, the man from xanth.
<xanthian@Zorch.SF-Bay.ORG> <xanthian@well.sf.ca.us>

liberato@dri.com (Jimmy Liberato) (03/14/91)

xanthian@zorch.SF-Bay.ORG (Kent Paul Dolan) writes:

>david@twg.com (David S. Herron) writes:

>> (And don't tell me you throw away that useful commentary at the
>> beginning? Shame! How else do you know who to blame on that cheap PD
>> software!?)

>Nope; I always save that and pack it away as POSTER.sources or
>POSTER.binaries (or occasionally POSTER.archive);...
>I get help doing this; the "unshar" here is especially nice; it takes
>the part _above_ what it identifies at the shar file, and saves it as
><filename>.hdr...
> [more info on how to unshar efficiently]

If there are any nn newsreader users who haven't toyed with some of its
advanced features, try this:  After highlighting the articles you want
in the article selection menu in the amiga binaries group type  :unshar
The headers get stripped and saved and all the selections get unshared.
Now if they didn't have the superfluous sharing all you would have to do
is type  :decode and you would directly end up with the *.zoo file as with
the ibmpc binaries group.  

--
Jimmy Liberato   liberato@dri.com
                 ...uunet!drivax!liberato