Heredocs pass multi-line text to commands inline using << EOF. Process substitution <(command) treats command output as a file for tools like diff. These advanced bash features simplify complex input handling in scripts.
Heredoc
cat << EOF > config.yaml
server:
port: 8080
host: localhost
EOF
# Process substitution
diff <(sort file1.txt) <(sort file2.txt)