shell 脚本自动回填

有时候咱们须要执行脚本想要自动回填一些内容,好比ssh

$cat test.sh
ssh-copy-id tester@10.1.2.3

首先脚本会提示code

Are you sure you want to continue connecting (yes/no)?test

而后脚本

tester@10.1.2.3's password:word

咱们如何进行操做呢? 使用!进行操做ant

test.sh <<!
y
pasword
!
相关文章
相关标签/搜索