🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #24970

Correction to joiner script

#24970
From: Dennis Cohen
Date: Thu, 11 Feb 1988 15:29
27 lines
1810 bytes
A few weeks ago, someone posted a "joiner" script to combine the various parts
of a multipart BinHex posting.  I decided to give it a try on the Esperanto
stack posting that just went past and discovered a little (?) error.  It looks
for lines that start with three hyphens and does no other checking.  This can
and does happen in the middle of BinHexed files (witness part 10 of the
Esperanto stack), causing great foulups.  I have corrected it to look for lines
that start with three hyphens AND a space.  This cannot happen in the middle
of a BinHex run, since spaces aren't legal there.  The corrected script follows:

#! /bin/csh -f                                            
# usage: joiner file > joined                              
#   or  cat parts | joiner > joined                    
                                                        
if ($#argv == 0) then                                  
        sed -n -e '/^--- /,/^--- /  p' | sed -e '/^--- / d'
else                                                     
        sed -n -e '/^--- /,/^--- /  p' $1 | sed -e '/^--- / d'
endif                                                   


I hope that this will be of help to others.  I normally wouldn't even have
seen it as I have MPW scripts to do this sort of thing, but just decided to let
the Pyramid have a go at it.

Dennis Cohen
Ashton-Tate Glendale Development Center
dBASE Mac Development Team
Technical Details
Message-ID: <300@dbase.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!gatech!udel!burdvax!sdcrdcf!trwrb!scgvaxd!ashtate!dbase!drc

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!gatech!udel!burdvax!sdcrdcf!trwrb!scgvaxd!ashtate!dbase!drc
From: drc@dbase.UUCP (Dennis Cohen)
Newsgroups: comp.sys.mac
Subject: Correction to joiner script
Keywords: joiner, BinHex
Message-ID: <300@dbase.UUCP>
Date: 11 Feb 88 15:29:56 GMT
Organization: Ashton Tate Development Center Glendale Cal.
Lines: 27