我想使用附加文件描述符在远程机器上执行本地脚本。
#!/bin/bash
echo "first log"
echo "second log" >&3
我尝试以这种方式运行它:
ssh remote_host 'bash -s' < test.sh >first.log 3>second.log
只有我的第一个日志被填充。其次,它给出了“错误的文件描述符”错误。
我想使用附加文件描述符在远程机器上执行本地脚本。
#!/bin/bash
echo "first log"
echo "second log" >&3
我尝试以这种方式运行它:
ssh remote_host 'bash -s' < test.sh >first.log 3>second.log
只有我的第一个日志被填充。其次,它给出了“错误的文件描述符”错误。