Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.unix.shell > #21736

Re: Extended pattern syntax extension

From William Unruh <unruh@invalid.ca>
Newsgroups comp.unix.shell
Subject Re: Extended pattern syntax extension
Date 2021-07-04 15:57 +0000
Organization A noiseless patient Spider
Message-ID <sbslp6$t6f$1@dont-email.me> (permalink)
References <s7io9t$mr3$1@news-1.m-online.net> <sbqpud$igo$1@news-1.m-online.net> <MmsCcM5LbSdiv6H71k@bongo-ra.co> <sbshup$2kp$1@news-1.m-online.net> <gtsCcM5Lb@bongo-ra.co>

Show all headers | View raw


On 2021-07-04, Spiros Bousbouras <spibou@gmail.com> wrote:
> On Sun, 4 Jul 2021 16:52:09 +0200
> Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>> On 04.07.2021 16:32, Spiros Bousbouras wrote:
>> > On Sun, 4 Jul 2021 00:56:13 +0200
>> > Janis Papanagnou <janis_papanagnou@hotmail.com> wrote:
>> >> the ksh man page...
>> >>
>> >>  "A pattern-list is a list of one or more patterns separated from each
>> >>   other with a & or ⎪.  A & signifies that all patterns must be matched
>> >>   whereas ⎪ requires that only one pattern be matched."
>> > 
>> > I believe you want  |  rather than  ⎪ .Somehow you replaced the former
>> > character with the latter which looks similar.
>> 
>> I haven't inspected the character's code number, I just copy/pasted it
>> from the ksh man page, I don't think I've replaced anything. If I copy
>> the text passages from the man page into 'od -c' I certainly don't get
>> the pipe symbol '|'. Does your ksh man page show the correct character?
>
> It shows  |  i.e. ASCII 124. I also experimented with using  ⎪ (unicode
> 9130 decimal) and  ksh  takes it literally i.e. it matches itself. I think
> it would be good if you examined the source code of the man page. If it
> really has  ⎪  then it's a bug. If it doesn't then the bug is with one
> of the tools of the man pipeline which translate the page.
>

Using hexedit the lines in the  unxz man page which are 

       ......................................................s:

              ;   &   (   )   ⎪   <   >   new-line   space   tab

       A

come out as 
00000744   73 3A 0A 2E  50 50 0A 2E  52 53 0A 5C  66 33 3B 20  20 20 26 20  s:..PP..RS.\f3;   &
00000758   20 20 28 20  20 20 29 20  20 20 5C 28  62 76 20 20  20 3C 20 20    (   )   \(bv   <
0000076C   20 3E 20 20  20 6E 65 77  2D 6C 69 6E  65 20 20 20  73 70 61 63   >   new-line   spac
00000780   65 20 20 20  74 61 62 5C  66 50 0A 2E  52 45 0A 2E  50 50 0A 41  e   tab\fP..RE..PP.A

Ie, it is the man page that is wrong-- consistantly using the Unicode
representation rather than that Ascii. 

And the symbol they use in the man page do not work as a substitute

Under ksh

echo a | cat

gives
a | cat

Not as it should

a

Ie, that symbol does NOT act as a pipe.

Back to comp.unix.shell | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Extended pattern syntax extension Janis Papanagnou <janis_papanagnou@hotmail.com> - 2021-05-13 10:34 +0200
  Re: Extended pattern syntax extension Spiros Bousbouras <spibou@gmail.com> - 2021-05-13 13:22 +0000
    Re: Extended pattern syntax extension Janis Papanagnou <janis_papanagnou@hotmail.com> - 2021-05-13 16:59 +0200
      Re: Extended pattern syntax extension Spiros Bousbouras <spibou@gmail.com> - 2021-05-13 18:34 +0000
        Re: Extended pattern syntax extension Janis Papanagnou <janis_papanagnou@hotmail.com> - 2021-05-15 11:54 +0200
  Re: Extended pattern syntax extension Kaz Kylheku <563-365-8930@kylheku.com> - 2021-05-13 16:04 +0000
    Re: Extended pattern syntax extension Janis Papanagnou <janis_papanagnou@hotmail.com> - 2021-05-13 20:18 +0200
  Re: Extended pattern syntax extension Janis Papanagnou <janis_papanagnou@hotmail.com> - 2021-07-04 00:56 +0200
    Re: Extended pattern syntax extension Spiros Bousbouras <spibou@gmail.com> - 2021-07-04 14:32 +0000
      Re: Extended pattern syntax extension Janis Papanagnou <janis_papanagnou@hotmail.com> - 2021-07-04 16:52 +0200
        Re: Extended pattern syntax extension Spiros Bousbouras <spibou@gmail.com> - 2021-07-04 15:07 +0000
          Re: Extended pattern syntax extension Janis Papanagnou <janis_papanagnou@hotmail.com> - 2021-07-04 17:36 +0200
            Re: Extended pattern syntax extension William Unruh <unruh@invalid.ca> - 2021-07-04 17:03 +0000
              Re: Extended pattern syntax extension "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2021-07-04 15:32 -0400
                Re: Extended pattern syntax extension "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2021-07-04 15:40 -0400
              Re: Extended pattern syntax extension joerg@schily.net - 2021-07-05 10:43 +0000
            Re: Extended pattern syntax extension Spiros Bousbouras <spibou@gmail.com> - 2021-07-04 17:36 +0000
          Re: Extended pattern syntax extension William Unruh <unruh@invalid.ca> - 2021-07-04 15:57 +0000
            Re: Extended pattern syntax extension Spiros Bousbouras <spibou@gmail.com> - 2021-07-04 17:17 +0000
              Re: Extended pattern syntax extension William Unruh <unruh@invalid.ca> - 2021-07-04 19:43 +0000
        Re: Extended pattern syntax extension William Unruh <unruh@invalid.ca> - 2021-07-04 15:33 +0000

csiph-web