Translations of this page:
- 日本語 (ja)
- English (en)
最近の更新
Tag Cloud
このページへのアクセス
今日: 7 / 昨日: 1
総計: 445
- Dokuwiki.fl8.jp(1546)
- 13 CentOS6メール設定(33)
- FreeBSD カーネル再構築(29)
- VPNサーバ(PacketiX)(26)
- 05 rsync(25)
最近の更新
このページへのアクセス
今日: 7 / 昨日: 1
総計: 445
This will display only one line.
while read NAME HOST CMD do ssh $NAME@$HOST "$CMD" done
When you run SSH, stdin is directed at it, so the entire file is passed to SSH, not just the one line you read with read. Therefore, after executing SSH, there are no more lines to read, so the while loop will end in one go.
To prevent this, use the -n option to ssh to redirect /dev/null and not redirect stdin.