All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG][REPORT] Possible error in on man 7 glob
@ 2016-08-08 23:29 Arnaud Gaillard
       [not found] ` <CACH3jogB0J+3bvBSsSS=fBkqO=AydnVNdcAA-pijhK1bBOvKWA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Arnaud Gaillard @ 2016-08-08 23:29 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, l-hour_q-ZrNlpQwM5lQ

Hello,

the `man 7 glob` states that:

>A range cannot contain an explicit '/' character;
> this would lead to a syntax error.

What I understand from this is that :

> sh$ echo [/-a]
> sh$ echo [a-/]

should be producing syntax errors. However, this is not the case,
as these just print out literally.

> sh$ uname -a
Linux caml 3.19.0-25-generic #26~14.04.1-Ubuntu SMP \
Fri Jul 24 21:16:20 UTC \
2015 x86_64 x86_64 x86_64 GNU/Linux \

This was tested on:

* bash: GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
* tcsh: tcsh 6.19.00 (Astron)
* ksh: sh (AT&T Research) 93u

Sincerely yours,

-- 
Arnaud GAILLARD
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [BUG][REPORT] Possible error in on man 7 glob
       [not found] ` <CACH3jogB0J+3bvBSsSS=fBkqO=AydnVNdcAA-pijhK1bBOvKWA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-08-09  5:25   ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2016-08-09  5:25 UTC (permalink / raw)
  To: Arnaud Gaillard; +Cc: linux-man, l-hour_q-ZrNlpQwM5lQ

Hello Arnaud,

On 9 August 2016 at 11:29, Arnaud Gaillard <arnaud.mgaillard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hello,
>
> the `man 7 glob` states that:
>
>>A range cannot contain an explicit '/' character;
>> this would lead to a syntax error.
>
> What I understand from this is that :
>
>> sh$ echo [/-a]
>> sh$ echo [a-/]
>
> should be producing syntax errors. However, this is not the case,
> as these just print out literally.
>
>> sh$ uname -a
> Linux caml 3.19.0-25-generic #26~14.04.1-Ubuntu SMP \
> Fri Jul 24 21:16:20 UTC \
> 2015 x86_64 x86_64 x86_64 GNU/Linux \
>
> This was tested on:
>
> * bash: GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
> * tcsh: tcsh 6.19.00 (Astron)
> * ksh: sh (AT&T Research) 93u

Further down the page, there is a statement: "However, POSIX requires
that a wildcard pattern is left unchanged when it is syntactically
incorrect". So, the point is that a syntactically incorrect pattern
doesn't cause an error, it simply doesn't glob. But I agree that the
text you cite is a little confusing. So I changed the text there to:

       A range containing an explicit  '/'  character  is
       syntactically  incorrect.  (POSIX requires that syntactically incorrect
       patterns are left unchanged.)

Hopefully, that lessens the scope for misreading.

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2016-08-09  5:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-08 23:29 [BUG][REPORT] Possible error in on man 7 glob Arnaud Gaillard
     [not found] ` <CACH3jogB0J+3bvBSsSS=fBkqO=AydnVNdcAA-pijhK1bBOvKWA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-09  5:25   ` Michael Kerrisk (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.