İşlevler bash
esas olarak bileşik komutlar (veya kod blokları) olarak adlandırılır. Kimden man bash
:
Compound Commands
A compound command is one of the following:
...
{ list; }
list is simply executed in the current shell environment. list
must be terminated with a newline or semicolon. This is known
as a group command.
...
Shell Function Definitions
A shell function is an object that is called like a simple command and
executes a compound command with a new set of positional parameters.
... [C]ommand is usually a list of commands between { and }, but
may be any command listed under Compound Commands above.
Sebep yok, sadece sözdizimi var.
Tek hat işlevi verilen liste bir satır ya da ile sona olmadığından ;
, bash
şikayet etmektedir.