sqlite>
# либо
Python 3.10.4 (main, Jun 29 2022, 12:14:53) [GCC 11.2.0] on linux
>>>
# или
MariaDB [(none)]>
myscript>
#!/usr/bin/env bash
my_cmd_1() {
echo "1st command output. Args: $*"
}
my_cmd_2() {
echo "2nd command output. Args: $*"
}
echo 'Available commands: my_cmd_1, my_cmd_2, exit'
while true; do
read -erp '>>> '
$REPLY
if [[ "$REPLY" == "exit" ]]; then
break
fi
done
~ $ ./cmd.sh
Available commands: my_cmd_1, my_cmd_2, exit
>>> my_cmd_1 --option argument
1st command output. Args: --option argument
>>> exit
read --help
man readline