Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell style for multi-stage pipeline with heredoc #632

Open
robin-a-meade opened this issue Apr 4, 2021 · 0 comments
Open

Shell style for multi-stage pipeline with heredoc #632

robin-a-meade opened this issue Apr 4, 2021 · 0 comments
Labels
lang:shell The shell (e.g. POSIX shell/bash) langauge

Comments

@robin-a-meade
Copy link

robin-a-meade commented Apr 4, 2021

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

cat <<'EOF' \
| cat \
| cat \
| cat
hello
EOF

Approach 2

cat <<'EOF' |
hello
EOF
cat \
| cat \
| cat

Approach 3

(
  cat \
  | cat \
  | cat \
  | cat 
) <<'EOF'
hello
EOF

Discussion: https://stackoverflow.com/questions/7046381

@vapier vapier added the lang:shell The shell (e.g. POSIX shell/bash) langauge label Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang:shell The shell (e.g. POSIX shell/bash) langauge
Projects
None yet
Development

No branches or pull requests

2 participants