Shell脚本:如何输出到命令行?

cod*_*dea 1 linux shell command-line

我正在制作一个Shell脚本,我想知道执行脚本时是否可以直接写到命令行?

范例:

user@localhost:/home/user$./script.sh
... output
... another output
... another output
... last output
user@localhost:/home/user$I want to write here on the command line
Run Code Online (Sandbox Code Playgroud)

我不想“回显”某些文本,我想直接在提示符下写。

谢谢!

Eim*_*tas 5

不,你不能那样做。如果要让用户在脚本完成后调用提供的命令-为什么不提示用户进行确认?