Use backslashes for readability.
Section: Overview and Core Patterns
Split a long pipeline across lines
bash
bash
ps aux \n | grep python \n | grep -v grep \n | awk '{print $2, $11}'Explanation
Long shell pipelines become much easier to read and maintain when formatted over multiple lines.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Overview and Core Patterns
Pipe file content into grep
Basic pipeline for filtering text from a file.
Save output and continue pipeline
Write output to a file while still passing it downstream.