mongo
我想创建一个类似于, node
, redis-cli
,mysql
等编程解释器的 bash 脚本。
我希望能够使用类似的命令test
,它的行为类似于上面的示例。
thomas@workstation:~$ test
>
我如何做出这样的命令?这个叫什么?
我希望能够获取内容并将其转换为变量。
thomas@workstation:~$ test
> hello world
hello world
thomas@workstation:~$
一旦我希望能够处理代码中的字符串“hello world”,例如回显它,我只想在按下回车键后获取一个“条目”。
这个叫什么?如何使用 BASH 制作一个?