我在 bash shell 上,我希望命令的输出直接出现在命令执行后出现的命令提示符中!
我设想的示例,以说明我的想法:
locate create_tables.sql|MAGIC_command
user@localhost:~# /usr/share/doc/phpmyadmin/create_tables.sql
Run Code Online (Sandbox Code Playgroud)
现在,像这样使用 comman dsubstitution
sudo $(locate create-tables.sql)
Run Code Online (Sandbox Code Playgroud)
工作但 立即执行输出,我希望能够之前编辑它。有办法吗?