• Tools
  • Articles
  • Q&A
  • Login
0 0

shell脚本里用了ssh xyz@destination后,执行到这句语句后就不会执行后面的语句了,想在远程端继续执行脚本该怎么办呢?


shell ssh

12 years, 10 months ago
思念○明日●〓

思念○明日●〓


share
思念○明日●〓 12 years, 10 months ago

Answers

0

给个例子
如果直接执行命令的话:

   
  ssh xyz@destination "echo hello world | awk '{print \$1}'"
 

如果是执行本地的脚本文件的话:

   
  ssh xyz@destination 'bash -s' < local_script.sh
 

answered 12 years, 10 months ago
思念○明日●〓

人上被人妻


share
人上被人妻 answered 12 years, 10 months ago

Your Answer

Ask Question
Related questions

ubuntu里的hostname

运行通过ssh连接的远程计算机上的sh文件和运行本地的一样么?

如何在使用ssh登陆虚拟机时跳转到同步的目录下?

`ps` 命令如何查看所有当前用户,但不在当前 session 中的进程

shell find 不显示路径名

为什么用java调shell脚本时,用到top命令的地方,会报TERM environment...