io-重定向 问答列表

重定向 bash 脚本的所有输出,包括命令 [duplicate]

作者:Alexey Kiyashkin 提问时间:11/13/2023

这个问题在这里已经有答案了: 如何在执行 shell 命令时回显它们 (17 个答案) 10天前关闭。 我正在学习编写bash脚本,我有一个脚本是这样的: #!/bin/bash log_file...

将 netcat 的 stdinput 重定向到 bash 脚本的当前 stdout

作者:SempriGno 提问时间:11/10/2023

我有这个脚本: #!/bin/bash exec 4>&1 nc localhost 100 0<&4 & echo hello echo .... 我只想向 netcat 发送 hello ...


共12条 当前第2页