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


Groups > gnu.bash.bug > #15643 > unrolled thread

Re: man bash does not list 'in' as a builtin command

Started byEli Schwartz <eschwartz@archlinux.org>
First post2019-11-25 17:09 -0500
Last post2019-11-25 17:09 -0500
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: man bash does not list 'in' as a builtin command Eli Schwartz <eschwartz@archlinux.org> - 2019-11-25 17:09 -0500

#15643 — Re: man bash does not list 'in' as a builtin command

FromEli Schwartz <eschwartz@archlinux.org>
Date2019-11-25 17:09 -0500
SubjectRe: man bash does not list 'in' as a builtin command
Message-ID<mailman.2636.1574719766.13325.bug-bash@gnu.org>

[Multipart message — attachments visible in raw view] — view raw

On 11/25/19 4:53 PM, Greg Wooledge wrote:
> On Mon, Nov 25, 2019 at 01:43:41PM -0800, Peter Benjamin wrote:
>> Description:
>>  'in' is a builtin command and is not listed in the man page as such.
> 
> It's actually a keyword.  It's part of the "for" and "case" syntax.
> 
> wooledg:~$ type in
> in is a shell keyword
> 
> for NAME in WORDS; do ...; done
> 
> case WORD in PATTERN) ... ;; esac

And, it's even listed in the manpage, if you have patience to go through
every mention of the pattern '\bin\b' and filter out the plain English
ones...

RESERVED WORDS
       Reserved words are words that have a special meaning to the
shell.  The following words are recognized as reserved when unquoted and
either the first word of
       a simple command (see SHELL GRAMMAR below) or the third word of a
case or for command:

       ! case  coproc  do done elif else esac fi for function if in
select then until while { } time [[ ]]

So the OP has their wish. It is documented in a section of the manpage
they did not think to check.

-- 
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web