Shell style for multi-stage pipeline with heredoc
Open
lang:shell
- Dominant language
- HTML
- Stars
- 39.6k
- Forks
- 12.9k
- Avg merge
- 42m
- Merged PRs (30d)
- 15
Description
Please update the Shell Style guide to indicate which of the following 3 approaches for a multi-stage pipeline with heredoc is recommended:
### Approach 1
```bash
cat <<'EOF' \
| cat \
| cat \
| cat
hello
EOF
```
### Approach 2
```bash
cat <<'EOF' |
hello
EOF
cat \
| cat \
| cat
```
### Approach 3
```bash
(
cat \
| cat \
| cat \
| cat
) <<'EOF'
hello
EOF
```
Discussion: https://stackoverflow.com/questions/7046381
Contributor guide
Assessment
This issue has not been assessed yet.