0
我想创建一个实现以下步骤shell脚本:shell脚本 - 将消息发送到远程计算机并等待答案
(1) Open a TCP socket to a remote machine
(2) Send a text file zzz.txt to the remote server
(3) Wait for an answer from the remote server (like: echo "OK")
(4) Check the answer
(5) Close connection
打开一个连接应该是不错的验证码
fd=100
eval exec "$fd<>/dev/tcp/"REMOTE IP"/4599"
scp是什么问题? –
这是我第一次需要做这样的脚本,所以我不知道最好的方法来做到这一点。我怎么能使用scp? – user3472065