[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: man bash does not list 'in' as a builtin command
From: |
Greg Wooledge |
Subject: |
Re: man bash does not list 'in' as a builtin command |
Date: |
Mon, 25 Nov 2019 16:53:07 -0500 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
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
I would not recommend attempting to create a command named "in" to use
in shell scripts. It's bound to get ugly.