[comp.os.minix] gres for BSD

Leisner.Henr@xerox.com (Marty) (02/10/89)

Does anyone have a copy of gres which works on BSD Unix?  I want to unshar
Minix shell archives on a BSD machine (actually a masscomp, (sorta BSD?)),
and the standard gres won't compile on this Unix (the regexp.h seem to be
incompatible).

Before I start looking for what the problem is, I'd figured I'd give net
land a holler and save me a few hours (I never really knew how the regexp()
routines work and the difference between Sys V / BSD /Minix
implementations).

BTW, where did gres come from?  Was it standard on Version 7?

marty
ARPA:	leisner.henr@xerox.com
GV:  leisner.henr
NS:  martin leisner:wbst139:xerox
UUCP:	hplabs!arisia!leisner
 

ncoverby@ndsuvax.UUCP (Glen Overby) (02/10/89)

In article <8413@louie.udel.EDU> Leisner.Henr@xerox.com (Marty) writes:
>Does anyone have a copy of gres which works on BSD Unix?

Yes and no.  I hacked up a sed script which works for unsharing old-Minix
shar files.  Here it is:

#!//bin/ksh
#  minix gres clone
sed "s/$1/$2/g"


>and the standard gres won't compile on this Unix (the regexp.h seem to be
>incompatible).

That is strange.  Where exactly did the regexp library come from?  It seems
to me that it was added in v1.2 from a net posting.  At one time I had gres
running on our 4.3BSD VAX.

>BTW, where did gres come from?  Was it standard on Version 7?

I don't belive so.  I think it is unique to Minix.

Glen Overby     ncoverby@plains.nodak.edu
uunet!ndsuvax!ncoverby
ncoverby@ndsuvax (Bitnet)

fdg@sorsac.UUCP (20SO940210) (02/11/89)

In article <8413@louie.udel.EDU> Leisner.Henr@xerox.com (Marty) writes:
>Does anyone have a copy of gres which works on BSD Unix?  I want to unshar
>Minix shell archives on a BSD machine (actually a masscomp, (sorta BSD?)),

If your request is only for a copy of gres to run on BSD unix, I can't
help you but if your aim is to unshar a file that uses gres, I would
suggest that you use sed.  I alwas modify the gres command line to use sed.

If the gres command is

gres '^X' '' > README << '/'

change it to be either

sed 's/^X//' > README << '/'

or

sed '/^X/s///' > README << '/'

I posted this to the net because I have see several other questions about
unsharing without gres.

Fred Gant			PHONE: 404 573-6567
AT&T Network Systems		UUCP:  {gatech|att|akgua}!sorsac!fdg
Atlanta, GA

ast@cs.vu.nl (Andy Tanenbaum) (02/11/89)

In article <2110@ndsuvax.UUCP> ncoverby@ndsuvax.UUCP (Glen Overby) writes:
>
>In article <8413@louie.udel.EDU> Leisner.Henr@xerox.com (Marty) writes:
>>BTW, where did gres come from?  Was it standard on Version 7?
>I don't belive so.  I think it is unique to Minix.

Actually, gres was standard in V6.  It was included in MINIX 1.1 instead
of sed because the former was available and the latter was not.

Andy Tanenbaum (ast@cs.vu.nl)

willy@idca.tds.PHILIPS.nl (Willy Konijnenberg) (02/12/89)

In article <8413@louie.udel.EDU> Leisner.Henr@xerox.com (Marty) writes:
>BTW, where did gres come from?  Was it standard on Version 7?
>
I never heard of it before MINIX, but I recently found that it is also
in the MKS toolkit, a collection of unixy programs on MS-DOS.
The portability section of the man page didn't mention any unix version
that it was derived from. Only that it is a sed subset.
All other MKS man pages mention unix compatibility, so I guess gres
was not taken from any unix version.
Now was MINIX gres inspired by MKS, or the other way around, or is
there still a third party involved?
Just curious...

-- 
	Willy Konijnenberg		<willy@idca.tds.philips.nl>

creps@silver.bacs.indiana.edu (Steve Creps) (02/12/89)

   This seems to work on Ultrix (csh) for unsharing shell archives that
call for gres, since having to edit a shar file defeats the purpose of
using unshar. Put the following shell script into your bin, calling it
gres:

#!/bin/csh
sed s/$1/$2/

-	-	-	-	-	-	-	-	-	-
Steve Creps, Indiana University, Bloomington, home of the "Hoosiers"
	creps@silver.bacs.indiana.edu (129.79.1.6)
	{inuxc,rutgers,uunet!uiucdcs,pur-ee}!iuvax!silver!creps
	creps@iubacs.bitnet (forwarded)

alan@oetl.UUCP (Alan Strassberg) (02/13/89)

>>BTW, where did gres come from?  Was it standard on Version 7?
>>
>I never heard of it before MINIX, but I recently found that it is also
[]
>Just curious...

	"There was once a program called gres that did simple
	substitution, but it expired almost immediately when
	sed was born"

	Quote from paragraph about "why do we have both sed and grep ?"

	From  The Unix Programming Environment by Kernighan and Pike
	page 111.
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Alan Strassberg	      	     UUCP: alan@oetl   ..{leadsv,pyramid}!oetl!alan
Lockheed, Santa Cruz, Ca.    work (408) 425-6126   	
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

mbunca@ecsvax.UUCP (Mark J. Boyd) (02/13/89)

The current discussion of gres triggered a memory of seeing it
mentioned. I just followed up on that memory. Page 111 of 
'The UNIX Programming Environment' says "Programs do die, however.
There was once a program called gres that did simple substitution,
but it expired almost immediately when sed was born."


	Mark Boyd, University of North Carolina - Asheville, NC 28804

mboen@nixpbe.UUCP (Martin Boening) (02/13/89)

Please DON'T!!!

Actually, the MINIX-Community is trying to switch to shell-archives that
use SED instead of GRES. So just wait a while and don't encourage the people
using gres to continue doing so. A sed.c and a new shar.c were posted
by ast and should be available to all Minix users.

To unshar current shars, just replace those
	gres '^X'' (or so)

by 
        sed "s/^X//"

(can be done by sed also, I think)

and you can unshar 99% of the Minix files on your machine.

Try it.

Martin

Email:
!USA: ...!unido!nixpbe!mboening.pad
USA:  ...!uunet!linus!nixbur!mboening.pad

dokos@inmet (02/14/89)

Kernighan & Pike report that there once was a gres on (pre-version 7)
Unix that was abandoned soon after sed came into use. I would expect
that to be the "inspiration" for Minix (and other) gres's.

Nick Dokos	dokos@inmet.inmet.com	uunet!inmet!dokos

wheels@mks.UUCP (Gerry Wheeler) (02/14/89)

In article <175@ssp11.idca.tds.philips.nl>, willy@idca.tds.PHILIPS.nl (Willy Konijnenberg) writes:
> In article <8413@louie.udel.EDU> Leisner.Henr@xerox.com (Marty) writes:
> >BTW, where did gres come from?  Was it standard on Version 7?
> I never heard of it before MINIX, but I recently found that it is also
> in the MKS toolkit, a collection of unixy programs on MS-DOS.
> Now was MINIX gres inspired by MKS, or the other way around?

I asked around here to see if anyone knew of this.  The concensus is
that gres is older than sed, which pretty much replaces it.  It may
never have been part of the Unix distribution, although we do have a man
page somewhere around here for it.  It doesn't seem to get much use, but
for simple things I find gres commands easier to type than sed commands. 
 --
     Gerry Wheeler                           Phone: (519)884-2251
Mortice Kern Systems Inc.               UUCP: uunet!watmath!mks!wheels
   35 King St. North                             BIX: join mks
Waterloo, Ontario  N2J 2W9                  CompuServe: 73260,1043

-- 
     Gerry Wheeler                           Phone: (519)884-2251
Mortice Kern Systems Inc.               UUCP: uunet!watmath!mks!wheels
   35 King St. North                             BIX: join mks
Waterloo, Ontario  N2J 2W9                  CompuServe: 73260,1043

poole@forty2.UUCP (Simon Poole) (02/16/89)

In article <201@nixpbe.UUCP> mboen@nixpbe.UUCP (Martin Boening) writes:
.......
>Actually, the MINIX-Community is trying to switch to shell-archives that
>use SED instead of GRES. So just wait a while and don't encourage the people
>using gres to continue doing so. A sed.c and a new shar.c were posted
>by ast and should be available to all Minix users.
.......
Good joke, in particular as ST-Minix still has gres and the old shar (yes
I have sed etc., but if I shar something for distribution via the net,
I want to produce something that is usable by people that have only a
of the shelf Minix setup).


-- 
----------------------------------------------------------------------------
UUCP:   ...mcvax!cernvax!forty2!poole			Simon Poole
BITNET: K538915@CZHRZU1A
----------------------------------------------------------------------------

ast@cs.vu.nl (Andy Tanenbaum) (02/17/89)

In article <639@forty2.UUCP> poole@forty2.UUCP (Simon Poole) writes:
>I have sed etc., but if I shar something for distribution via the net,
>I want to produce something that is usable by people that have only a
>of the shelf Minix setup).

If you post something to this newsgroup, I think you can assume the readers
have sed and the new shar.  This makes the files easily unsharable on
UNIX systems.  Anyone not having the sed-based shar or sed.c can get them
by sending me email.

Andy Tanenbaum (ast@cs.vu.nl)

bet@dukeac.UUCP (Bennett Todd) (02/18/89)

Just for the sheer archaeology of it all, I rooted around my manuals archives
and discovered that neither gres nor sed is mentioned in my May 1975 Sixth
Edition UNIX Programmer's Manual, while my PWB/UNIX (May 1977) and Seventh
Edition (January 1979) both include sed and omit gres, so appearantly it came
and went between May '75 and May '77. RIP.

-Bennett
bet@orion.mc.duke.edu