【发布时间】:2016-06-11 15:03:54
【问题描述】:
这可能是非常基本的,但不幸的是我不知道如何用谷歌搜索它。
为什么下面的 sn-p 不能按预期工作?我的意思是,我怎样才能让cat 指向远程文件?
#!/bin/bash
ssh user@remoteaddress << EOF
mkdir sandpit
cd sandpit
echo "foo" > foo.txt
echo `cat foo.txt` > foo2.txt
EOF
【问题讨论】:
标签: linux bash shell ssh heredoc