-1

I have encountered this in the syntax for case after calling help case and getting case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac.

There was a question, whether "in" is a bash operator, but answers were answering the script problem of the person rather than saying clearly whether there is or it is an operator at all. I tried to find it in Bash documentation, but since in is a natural language preposition, the search provides lots of hits. Trying to find it as an operator, I was not successful.

Kusalananda
  • 333,661
Juandev
  • 101
  • In general you usually can get a good answer to "what is foo in Bash?" by invoking type foo in Bash (or type -a foo if you want). This works for many foos, including in; try type in. – Kamil Maciorowski Apr 18 '23 at 14:49

1 Answers1

1

It is a reserved word. From man bash:

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 [[ ]]

steeldriver
  • 81,074