The Unix Heritage Society mailing list
 help / color / Atom feed
* [TUHS] Traditional method of dealing with embedded shar files
@ 2020-07-20 17:23 Will Senn
  2020-07-20 17:44 ` Clem Cole
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Will Senn @ 2020-07-20 17:23 UTC (permalink / raw)
  To: TUHS main list


[-- Attachment #1: Type: text/plain, Size: 2264 bytes --]

As y'all know, I'm a relative latecomer to the world of Unix, but I do 
try to figure out how y'all did it back when. So, sometimes, as in this 
case, I can figure out how to do something, but I'm curious how it was 
done back in the day, moreso than how I can get it done today. I'm 
looking at the patching of my shiny new 2.11 BSD pl 431 system running 
on my speedy little virtual PDP-11/70, so I grabbed patch 432 (here's a 
portion of the patch):
...
     To install the update cut where indicated below and save to a file
     (/tmp/432) and then:

         cd /tmp
         sh 432
         ./432.sh
         ./432.rm
         sh 432.shar
         patch -p0 < 432.patch

     Watch carefully for any rejected parts of the patch.   Failure of a
     patch typically means the system was not current on all preceeding
     updates _or_ that local modifications have been made.
...
====== cut here
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#    432.rm
#    432.sh
#    432.shar
#    432.patch
...
#    End of shell archive

This seems straightforward. Just follow the directions et voila magic 
happens.

My questions for y'all are how would you go about doing this? Use vi to 
delete everything through the ==== cut here line? Use some combination 
of standard unix tools to chop it up? What was your workflow for 
patching up the system using these files?

In my world, if I screw something up, it's 15 seconds to run a restore 
script in my simh directory and I can try again, so my level of concern 
for a mistake is pretty low. If I was doing this in 1980, on real 
hardware, I would have had many concerns, as I'm sure some of y'all can 
remember, how did you prepare and protect yourselves so a patch was 
successful.

BTW, I thought .shar was an archive format, so when I saw the patch was 
a shar file, I was worried it would be in some binary form, lo and 
behold, it looks like text to me... not even b64. So much to learn, so 
little time.

Thanks,

Will

-- 
GPG Fingerprint: 68F4 B3BD 1730 555A 4462  7D45 3EAA 5B6D A982 BAAF


[-- Attachment #2: Type: text/html, Size: 2994 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [TUHS] Traditional method of dealing with embedded shar files
  2020-07-20 17:23 [TUHS] Traditional method of dealing with embedded shar files Will Senn
@ 2020-07-20 17:44 ` Clem Cole
  2020-07-20 17:52 ` Clem Cole
  2020-07-20 17:55 ` Warner Losh
  2 siblings, 0 replies; 14+ messages in thread
From: Clem Cole @ 2020-07-20 17:44 UTC (permalink / raw)
  To: Will Senn; +Cc: TUHS main list


[-- Attachment #1: Type: text/plain, Size: 2348 bytes --]

On Mon, Jul 20, 2020 at 1:25 PM Will Senn <will.senn@gmail.com> wrote:

> As y'all know, I'm a relative latecomer to the world of Unix, but I do try
> to figure out how y'all did it back when. So, sometimes, as in this case, I
> can figure out how to do something, but I'm curious how it was done back in
> the day, moreso than how I can get it done today. I'm looking at the
> patching of my shiny new 2.11 BSD pl 431 system running on my speedy little
> virtual PDP-11/70, so I grabbed patch 432 (here's a portion of the patch):
> ...
>     To install the update cut where indicated below and save to a file
>     (/tmp/432) and then:
>
>         cd /tmp
>         sh 432
>         ./432.sh
>         ./432.rm
>         sh 432.shar
>         patch -p0 < 432.patch
>
>     Watch carefully for any rejected parts of the patch.   Failure of a
>     patch typically means the system was not current on all preceeding
>     updates _or_ that local modifications have been made.
> ...
> ====== cut here
> #! /bin/sh
> # This is a shell archive, meaning:
> # 1. Remove everything above the #! /bin/sh line.
> # 2. Save the resulting text in a file.
> # 3. Execute the file with /bin/sh (not csh) to create:
> #    432.rm
> #    432.sh
> #    432.shar
> #    432.patch
> ...
> #    End of shell archive
>
> This seems straightforward. Just follow the directions et voila magic
> happens.
>
> My questions for y'all are how would you go about doing this? Use vi to
> delete everything through the ==== cut here line? Use some combination of
> standard unix tools to chop it up? What was your workflow for patching up
> the system using these files?
>
> In my world, if I screw something up, it's 15 seconds to run a restore
> script in my simh directory and I can try again, so my level of concern for
> a mistake is pretty low. If I was doing this in 1980, on real hardware, I
> would have had many concerns, as I'm sure some of y'all can remember, how
> did you prepare and protect yourselves so a patch was successful.
>
> BTW, I thought .shar was an archive format, so when I saw the patch was a
> shar file, I was worried it would be in some binary form, lo and behold, it
> looks like text to me... not even b64. So much to learn, so little time.
>
> Thanks,
>
> Will
>
> --
> GPG Fingerprint: 68F4 B3BD 1730 555A 4462  7D45 3EAA 5B6D A982 BAAF
>
>

[-- Attachment #2: Type: text/html, Size: 3427 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [TUHS] Traditional method of dealing with embedded shar files
  2020-07-20 17:23 [TUHS] Traditional method of dealing with embedded shar files Will Senn
  2020-07-20 17:44 ` Clem Cole
@ 2020-07-20 17:52 ` Clem Cole
  2020-07-20 17:56   ` Warner Losh
  2020-07-20 18:07   ` Will Senn
  2020-07-20 17:55 ` Warner Losh
  2 siblings, 2 replies; 14+ messages in thread
From: Clem Cole @ 2020-07-20 17:52 UTC (permalink / raw)
  To: Will Senn; +Cc: TUHS main list


[-- Attachment #1: Type: text/plain, Size: 1485 bytes --]

On Mon, Jul 20, 2020 at 1:25 PM Will Senn <will.senn@gmail.com> wrote:

> My questions for y'all are how would you go about doing this? Use vi to
> delete everything through the ==== cut here line?
>
Yep




> In my world, if I screw something up, it's 15 seconds to run a restore
> script in my simh directory and I can try again, so my level of concern for
> a mistake is pretty low. If I was doing this in 1980, on real hardware, I
> would have had many concerns, as I'm sure some of y'all can remember, how
> did you prepare and protect yourselves so a patch was successful.
>
Run an incremental backup and/or copy the files you new you we were messing
with.  The good news was that patch makes backups.

>
> BTW, I thought .shar was an archive format, so when I saw the patch was a
> shar file,
>
It was so of.  It was a way to send files around that people could easily
execute and you new would work through 7-bit based email which is all the
SMTP guaranteed in the early days.   Yeh but .. uucp was 8 yep.  But some
of the legs of the USENET were luck to be based on Arpanet site, which
might have had a mailer running BITNET.  When shar was created the 'least
needed' style assumptions were used.   As it was it was often that people
put tarballs, then compressed them and then uuencoded them inside.  Often a
space savings and made it easier -> compressed tar was pretty good, and
even with the 3 8-bit chars as 4 6-bit chars of uuencode it will worked out
well in practice.

[-- Attachment #2: Type: text/html, Size: 2880 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [TUHS] Traditional method of dealing with embedded shar files
  2020-07-20 17:23 [TUHS] Traditional method of dealing with embedded shar files Will Senn
  2020-07-20 17:44 ` Clem Cole
  2020-07-20 17:52 ` Clem Cole
@ 2020-07-20 17:55 ` Warner Losh
  2020-07-20 18:11   ` Will Senn
  2 siblings, 1 reply; 14+ messages in thread
From: Warner Losh @ 2020-07-20 17:55 UTC (permalink / raw)
  To: Will Senn; +Cc: TUHS main list


[-- Attachment #1: Type: text/plain, Size: 2790 bytes --]

On Mon, Jul 20, 2020 at 11:25 AM Will Senn <will.senn@gmail.com> wrote:

> As y'all know, I'm a relative latecomer to the world of Unix, but I do try
> to figure out how y'all did it back when. So, sometimes, as in this case, I
> can figure out how to do something, but I'm curious how it was done back in
> the day, moreso than how I can get it done today. I'm looking at the
> patching of my shiny new 2.11 BSD pl 431 system running on my speedy little
> virtual PDP-11/70, so I grabbed patch 432 (here's a portion of the patch):
> ...
>     To install the update cut where indicated below and save to a file
>     (/tmp/432) and then:
>
>         cd /tmp
>         sh 432
>         ./432.sh
>         ./432.rm
>         sh 432.shar
>         patch -p0 < 432.patch
>
>     Watch carefully for any rejected parts of the patch.   Failure of a
>     patch typically means the system was not current on all preceeding
>     updates _or_ that local modifications have been made.
> ...
> ====== cut here
> #! /bin/sh
> # This is a shell archive, meaning:
> # 1. Remove everything above the #! /bin/sh line.
> # 2. Save the resulting text in a file.
> # 3. Execute the file with /bin/sh (not csh) to create:
> #    432.rm
> #    432.sh
> #    432.shar
> #    432.patch
> ...
> #    End of shell archive
>
> This seems straightforward. Just follow the directions et voila magic
> happens.
>
> My questions for y'all are how would you go about doing this? Use vi to
> delete everything through the ==== cut here line? Use some combination of
> standard unix tools to chop it up? What was your workflow for patching up
> the system using these files?
>

sed -e '1,/---cut here---/d' < $patch | sh -x

is what I use, but there's a wide variety of 'cut here' lines in the
2.11BSD patches, so I have had to taylor to each patch.


> In my world, if I screw something up, it's 15 seconds to run a restore
> script in my simh directory and I can try again, so my level of concern for
> a mistake is pretty low. If I was doing this in 1980, on real hardware, I
> would have had many concerns, as I'm sure some of y'all can remember, how
> did you prepare and protect yourselves so a patch was successful.
>

Yea, it was always a crap-shoot back in the day on slow hardware. Backups
on tape were your best bet :(.


> BTW, I thought .shar was an archive format, so when I saw the patch was a
> shar file, I was worried it would be in some binary form, lo and behold, it
> looks like text to me... not even b64. So much to learn, so little time.
>

It is and it isn't. Mostly isn't for these patches. libarchive supports it,
but there's no standard and what libarchive supports is quite limited.

Warner


> Thanks,
>
> Will
>
> --
> GPG Fingerprint: 68F4 B3BD 1730 555A 4462  7D45 3EAA 5B6D A982 BAAF
>
>

[-- Attachment #2: Type: text/html, Size: 4548 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [TUHS] Traditional method of dealing with embedded shar files
  2020-07-20 17:52 ` Clem Cole
@ 2020-07-20 17:56   ` Warner Losh
  2020-07-20 18:08     ` Richard Salz
  2020-07-20 18:07   ` Will Senn
  1 sibling, 1 reply; 14+ messages in thread
From: Warner Losh @ 2020-07-20 17:56 UTC (permalink / raw)
  To: Clem Cole; +Cc: TUHS main list


[-- Attachment #1: Type: text/plain, Size: 1838 bytes --]

On Mon, Jul 20, 2020 at 11:54 AM Clem Cole <clemc@ccc.com> wrote:

>
>
> On Mon, Jul 20, 2020 at 1:25 PM Will Senn <will.senn@gmail.com> wrote:
>
>> My questions for y'all are how would you go about doing this? Use vi to
>> delete everything through the ==== cut here line?
>>
> Yep
>
>
>
>
>> In my world, if I screw something up, it's 15 seconds to run a restore
>> script in my simh directory and I can try again, so my level of concern for
>> a mistake is pretty low. If I was doing this in 1980, on real hardware, I
>> would have had many concerns, as I'm sure some of y'all can remember, how
>> did you prepare and protect yourselves so a patch was successful.
>>
> Run an incremental backup and/or copy the files you new you we were
> messing with.  The good news was that patch makes backups.
>
>>
>> BTW, I thought .shar was an archive format, so when I saw the patch was a
>> shar file,
>>
> It was so of.  It was a way to send files around that people could easily
> execute and you new would work through 7-bit based email which is all the
> SMTP guaranteed in the early days.   Yeh but .. uucp was 8 yep.  But some
> of the legs of the USENET were luck to be based on Arpanet site, which
> might have had a mailer running BITNET.  When shar was created the 'least
> needed' style assumptions were used.   As it was it was often that people
> put tarballs, then compressed them and then uuencoded them inside.  Often a
> space savings and made it easier -> compressed tar was pretty good, and
> even with the 3 8-bit chars as 4 6-bit chars of uuencode it will worked out
> well in practice.
>

There's various 'unshar' programs, but they are all just restricted
versions of the shell because of the wide diversity of 'shar'
implementation...  uuencoded compressed tar balls added another layer to
this mess as well :)

Warner

[-- Attachment #2: Type: text/html, Size: 3497 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [TUHS] Traditional method of dealing with embedded shar files
  2020-07-20 17:52 ` Clem Cole
  2020-07-20 17:56   ` Warner Losh
@ 2020-07-20 18:07   ` Will Senn
  2020-07-24 18:29     ` Random832
  1 sibling, 1 reply; 14+ messages in thread
From: Will Senn @ 2020-07-20 18:07 UTC (permalink / raw)
  To: Clem Cole; +Cc: TUHS main list


[-- Attachment #1: Type: text/plain, Size: 1252 bytes --]

On 7/20/20 12:52 PM, Clem Cole wrote:
>
>
> On Mon, Jul 20, 2020 at 1:25 PM Will Senn <will.senn@gmail.com 
> <mailto:will.senn@gmail.com>> wrote:
>
>     My questions for y'all are how would you go about doing this? Use
>     vi to delete everything through the ==== cut here line?
>
> Yep
Nice, seemed easy enough to me, but I was expecting real Unix folks use 
sed | awk | indent type answers.
> It was so of.  It was a way to send files around that people could 
> easily execute and you new would work through 7-bit based email which 
> is all the SMTP guaranteed in the early days.   Yeh but .. uucp was 8 
> yep.  But some of the legs of the USENET were luck to be based on 
> Arpanet site, which might have had a mailer running BITNET.  When shar 
> was created the 'least needed' style assumptions were used.   As it 
> was it was often that people put tarballs, then compressed them and 
> then uuencoded them inside.  Often a space savings and made it easier 
> -> compressed tar was pretty good, and even with the 3 8-bit chars as 
> 4 6-bit chars of uuencode it will worked out well in practice.

Hmm... can't wait to run across all of these variants :).

-- 
GPG Fingerprint: 68F4 B3BD 1730 555A 4462  7D45 3EAA 5B6D A982 BAAF


[-- Attachment #2: Type: text/html, Size: 3033 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [TUHS] Traditional method of dealing with embedded shar files
  2020-07-20 17:56   ` Warner Losh
@ 2020-07-20 18:08     ` Richard Salz
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Salz @ 2020-07-20 18:08 UTC (permalink / raw)
  To: Warner Losh; +Cc: TUHS main list


[-- Attachment #1: Type: text/plain, Size: 2298 bytes --]

shar, by the way, stands for "shell archive."  That is, it's an archive
that could be unpacked by feeding the file into sh.
The most complete unshar is probably at
http://sources.vsta.org/comp.sources.unix/volume15/cshar/  It's portable C
(for its time, 20 years ago). Safety, in terms of not trashing an existing
file, was a goal.


On Mon, Jul 20, 2020 at 1:59 PM Warner Losh <imp@bsdimp.com> wrote:

>
>
> On Mon, Jul 20, 2020 at 11:54 AM Clem Cole <clemc@ccc.com> wrote:
>
>>
>>
>> On Mon, Jul 20, 2020 at 1:25 PM Will Senn <will.senn@gmail.com> wrote:
>>
>>> My questions for y'all are how would you go about doing this? Use vi to
>>> delete everything through the ==== cut here line?
>>>
>> Yep
>>
>>
>>
>>
>>> In my world, if I screw something up, it's 15 seconds to run a restore
>>> script in my simh directory and I can try again, so my level of concern for
>>> a mistake is pretty low. If I was doing this in 1980, on real hardware, I
>>> would have had many concerns, as I'm sure some of y'all can remember, how
>>> did you prepare and protect yourselves so a patch was successful.
>>>
>> Run an incremental backup and/or copy the files you new you we were
>> messing with.  The good news was that patch makes backups.
>>
>>>
>>> BTW, I thought .shar was an archive format, so when I saw the patch was
>>> a shar file,
>>>
>> It was so of.  It was a way to send files around that people could easily
>> execute and you new would work through 7-bit based email which is all the
>> SMTP guaranteed in the early days.   Yeh but .. uucp was 8 yep.  But
>> some of the legs of the USENET were luck to be based on Arpanet site, which
>> might have had a mailer running BITNET.  When shar was created the 'least
>> needed' style assumptions were used.   As it was it was often that people
>> put tarballs, then compressed them and then uuencoded them inside.  Often a
>> space savings and made it easier -> compressed tar was pretty good, and
>> even with the 3 8-bit chars as 4 6-bit chars of uuencode it will worked out
>> well in practice.
>>
>
> There's various 'unshar' programs, but they are all just restricted
> versions of the shell because of the wide diversity of 'shar'
> implementation...  uuencoded compressed tar balls added another layer to
> this mess as well :)
>
> Warner
>

[-- Attachment #2: Type: text/html, Size: 4317 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [TUHS] Traditional method of dealing with embedded shar files
  2020-07-20 17:55 ` Warner Losh
@ 2020-07-20 18:11   ` Will Senn
  2020-07-20 18:41     ` Clem Cole
  0 siblings, 1 reply; 14+ messages in thread
From: Will Senn @ 2020-07-20 18:11 UTC (permalink / raw)
  To: Warner Losh; +Cc: TUHS main list


[-- Attachment #1: Type: text/plain, Size: 596 bytes --]

On 7/20/20 12:55 PM, Warner Losh wrote:
> Will said:
>
>     My questions for y'all are how would you go about doing this? Use
>     vi to delete everything through the ==== cut here line? Use some
>     combination of standard unix tools to chop it up? What was your
>     workflow for patching up the system using these files?
>
>
> sed -e '1,/---cut here---/d' < $patch | sh -x
>
> is what I use, but there's a wide variety of 'cut here' lines in the 
> 2.11BSD patches, so I have had to taylor to each patch.
Thanks, this is nice and simple. I'll be on the lookout for the differences.

Will

[-- Attachment #2: Type: text/html, Size: 1615 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [TUHS] Traditional method of dealing with embedded shar files
  2020-07-20 18:11   ` Will Senn
@ 2020-07-20 18:41     ` Clem Cole
  0 siblings, 0 replies; 14+ messages in thread
From: Clem Cole @ 2020-07-20 18:41 UTC (permalink / raw)
  To: Will Senn; +Cc: TUHS main list


[-- Attachment #1: Type: text/plain, Size: 547 bytes --]

On Mon, Jul 20, 2020 at 2:12 PM Will Senn <will.senn@gmail.com> wrote:

> sed -e '1,/---cut here---/d' < $patch | sh -x
>
> is what I use, but there's a wide variety of 'cut here' lines in the
> 2.11BSD patches, so I have had to taylor to each patch.
>
> Yep and you usually only running one or two at a time.   Your work  As
Wernflow of a applying a lot of patches is a tad different.  As Warner
said, there were plenty of different shar/unshars back in the day.

Just remember to thank Mary Ann for uuencode/decode which started it all ;-)
Clem

[-- Attachment #2: Type: text/html, Size: 1547 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [TUHS] Traditional method of dealing with embedded shar files
  2020-07-20 18:07   ` Will Senn
@ 2020-07-24 18:29     ` Random832
  2020-07-24 18:46       ` Will Senn
  2020-07-25  2:00       ` Dave Horsfall
  0 siblings, 2 replies; 14+ messages in thread
From: Random832 @ 2020-07-24 18:29 UTC (permalink / raw)
  To: TUHS

On Mon, Jul 20, 2020, at 14:07, Will Senn wrote:
> On 7/20/20 12:52 PM, Clem Cole wrote:
> > 
> > 
> > On Mon, Jul 20, 2020 at 1:25 PM Will Senn <will.senn@gmail.com> wrote:
> >> My questions for y'all are how would you go about doing this? Use vi to delete everything through the ==== cut here line? 
> > Yep
> Nice, seemed easy enough to me, but I was expecting real Unix folks use 
> sed | awk | indent type answers. 

For whatever it's worth, you can do the exact same thing as vi with sed in this case: 1,/====/d

I wasn't there, so I can't say if this was done in practice or if there was even enough uniformity in the markers for it to be reliable in theory [perhaps /^#!/,$p ?]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [TUHS] Traditional method of dealing with embedded shar files
  2020-07-24 18:29     ` Random832
@ 2020-07-24 18:46       ` Will Senn
  2020-07-24 18:57         ` Clem Cole
  2020-07-25  2:00       ` Dave Horsfall
  1 sibling, 1 reply; 14+ messages in thread
From: Will Senn @ 2020-07-24 18:46 UTC (permalink / raw)
  To: tuhs


[-- Attachment #1: Type: text/plain, Size: 874 bytes --]

On 7/24/20 1:29 PM, Random832 wrote:
> On Mon, Jul 20, 2020, at 14:07, Will Senn wrote:
>> On 7/20/20 12:52 PM, Clem Cole wrote:
>>>
>>> On Mon, Jul 20, 2020 at 1:25 PM Will Senn <will.senn@gmail.com> wrote:
>>>> My questions for y'all are how would you go about doing this? Use vi to delete everything through the ==== cut here line?
>>> Yep
>> Nice, seemed easy enough to me, but I was expecting real Unix folks use
>> sed | awk | indent type answers.
> For whatever it's worth, you can do the exact same thing as vi with sed in this case: 1,/====/d
>
> I wasn't there, so I can't say if this was done in practice or if there was even enough uniformity in the markers for it to be reliable in theory [perhaps /^#!/,$p ?]
I'm just getting comfortable using sed, thanks for the simplification.

Will

-- 
GPG Fingerprint: 68F4 B3BD 1730 555A 4462  7D45 3EAA 5B6D A982 BAAF


[-- Attachment #2: Type: text/html, Size: 1871 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [TUHS] Traditional method of dealing with embedded shar files
  2020-07-24 18:46       ` Will Senn
@ 2020-07-24 18:57         ` Clem Cole
  2020-07-24 19:21           ` Will Senn
  0 siblings, 1 reply; 14+ messages in thread
From: Clem Cole @ 2020-07-24 18:57 UTC (permalink / raw)
  To: Will Senn; +Cc: TUHS main list


[-- Attachment #1: Type: text/plain, Size: 875 bytes --]

On Fri, Jul 24, 2020 at 2:47 PM Will Senn <will.senn@gmail.com> wrote:

> I'm just getting comfortable using sed, thanks for the simplification.
>
> The issue with sed is that different shar programs used different
cut/here markers.  Using vi was safer and as I said, since you did not do
it everyday, it was no big deal.
Maybe since you have a number of these you want to apply, check with a grep
for the expected marker before you try to apply the sed script and only do
it in a more automated matter catching the vast majority of the markers.]

You asked how we did it.  As was said, there were a number of unshar(1)
commands out there, that did the sed for you.   Go looking in the archives,
but generally speaking using vi was 'good enough' for day to day work
because you did not run it that often / every day / were >>usually<< not
apply a lot of them in a row.

Clem

[-- Attachment #2: Type: text/html, Size: 2068 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [TUHS] Traditional method of dealing with embedded shar files
  2020-07-24 18:57         ` Clem Cole
@ 2020-07-24 19:21           ` Will Senn
  0 siblings, 0 replies; 14+ messages in thread
From: Will Senn @ 2020-07-24 19:21 UTC (permalink / raw)
  To: Clem Cole; +Cc: TUHS main list


[-- Attachment #1: Type: text/plain, Size: 1328 bytes --]

On 7/24/20 1:57 PM, Clem Cole wrote:
>
>
> On Fri, Jul 24, 2020 at 2:47 PM Will Senn <will.senn@gmail.com 
> <mailto:will.senn@gmail.com>> wrote:
>
>>     I'm just getting comfortable using sed, thanks for the
>>     simplification.
>
> The issue with sed is that different shar programs used different 
> cut/here markers. Using vi was safer and as I said, since you did not 
> do it everyday, it was no big deal.
> Maybe since you have a number of these you want to apply, check with a 
> grep for the expected marker before you try to apply the sed script 
> and only do it in a more automated matter catching the vast majority 
> of the markers.]
>
> You asked how we did it.  As was said, there were a number of 
> unshar(1) commands out there, that did the sed for you.  Go looking in 
> the archives, but generally speaking using vi was 'good enough' for 
> day to day work because you did not run it that often / every day / 
> were >>usually<< not apply a lot of them in a row.
>
> Clem
Yup, I was curious what it looked like in the day. After hearing from 
everybody, I will use vi the first time and if I have to do it a bunch 
of ties, will test a sed script... or just wait 'til Warner's done and 
just check it from source code :).

Will

-- 
GPG Fingerprint: 68F4 B3BD 1730 555A 4462  7D45 3EAA 5B6D A982 BAAF


[-- Attachment #2: Type: text/html, Size: 3590 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [TUHS] Traditional method of dealing with embedded shar files
  2020-07-24 18:29     ` Random832
  2020-07-24 18:46       ` Will Senn
@ 2020-07-25  2:00       ` Dave Horsfall
  1 sibling, 0 replies; 14+ messages in thread
From: Dave Horsfall @ 2020-07-25  2:00 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

On Fri, 24 Jul 2020, Random832 wrote:

> For whatever it's worth, you can do the exact same thing as vi with sed 
> in this case: 1,/====/d

It's been a while since I had to use it, but didn't "unshar" do this sort 
of thing, and in a safe manner too?  You'd be out of your mind to blindly 
run the shell on some anonymous shar file...

-- Dave

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, back to index

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20 17:23 [TUHS] Traditional method of dealing with embedded shar files Will Senn
2020-07-20 17:44 ` Clem Cole
2020-07-20 17:52 ` Clem Cole
2020-07-20 17:56   ` Warner Losh
2020-07-20 18:08     ` Richard Salz
2020-07-20 18:07   ` Will Senn
2020-07-24 18:29     ` Random832
2020-07-24 18:46       ` Will Senn
2020-07-24 18:57         ` Clem Cole
2020-07-24 19:21           ` Will Senn
2020-07-25  2:00       ` Dave Horsfall
2020-07-20 17:55 ` Warner Losh
2020-07-20 18:11   ` Will Senn
2020-07-20 18:41     ` Clem Cole

The Unix Heritage Society mailing list

Archives are clonable: git clone --mirror http://inbox.vuxu.org/tuhs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.tuhs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git