Updated SC2095 (markdown)

Victor Engmark
2020-06-25 15:28:28 +12:00
parent 671b15c8d7
commit 9c9b487f40

@@ -19,6 +19,18 @@ do
ssh -n "$host" "uptime"
done < hosts.txt
```
or
```sh
while read -r host
do
ssh "$host" <<'EOF'
uptime
EOF
done < hosts.txt
```
### Rationale:
Commands that process stdin will compete with the `read` statement for input. This is especially tricky for commands you wouldn't expect reads from stdin, like `ssh .. uptime`, `ffmpeg` and `mplayer`.