linux - 如何在单行pssh中运行多个命令?

标签 linux sh pssh

我想在单行中运行多个命令,如 command1、command2、command3,怎么办?

我试着跟随

pssh -Pi --user XXXX -h host.txt  -x "-oStrictHostKeyChecking=no" ls date 

我遇到以下错误

Stderr: ls: cannot access date: No such file or directory

最佳答案

在尝试了几种组合后,以下对我有用

pssh -Pi --user XXXX -h host.txt  -x "-oStrictHostKeyChecking=no" ls;date;

关于linux - 如何在单行pssh中运行多个命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47548412/

相关文章:

linux - 如何在 Shell 脚本 (Bash) 中搜索单词?

linux - 无法在 Mac 中运行二进制文件,在 Linux 上运行

unix - 为什么 sh、zsh 和 bash 在执行零字节文件时返回零?

linux - ID小于500的群组详情

linux - PSSH直接到目录

bash - '^@'在vim中是什么意思?

linux - xargs(或其他东西)参数前没有空格

linux - 我如何在 linux 中安装 mod-jk?

linux - 使用 Bash 脚本从 xdotool 搜索结果中检索单个元素