답변:
의 함수 bash
는 기본적으로 복합 명령 (또는 코드 블록)이라고합니다. 보낸 사람 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.
이유가 없습니다. 구문 일뿐입니다.
주어진 단선 함수의 목록이 개행 또는로 끝나지 않기 ;
때문에 bash
불평합니다.