# type.
. is a shell builtin
# help.
.:. filename [arguments]
Execute commands from a file in the current shell.
Read and execute commands from FILENAME in the current shell. The
entries in $PATH are used to find the directory containing FILENAME.
If any ARGUMENTS are supplied, they become the positional parameters
when FILENAME is executed.
Exit Status:
Returns the status of the last command executed in FILENAME; fails if
FILENAME cannot be read.
Проблема вif [ $? -eq 0 ] then;
Это должно бытьif [ $? -eq 0 ] ; then
Кое-что из этого вы написали правильно, но число неверно.
Причина, по которой ему не нравился elif
, заключается в том, что он был частью тестов на if
, так как не было оператора, начинающегося с then
.