Helmet
text_helmet¶
Protect header lines from being filtered by downstream pipes. Reads stdin into an array, emits the first n lines (default: 1) to stderr, and the remainder to stdout. This keeps header lines visible even when stdout is piped to grep or similar filters.
Example¶
df -hP | helmet | grep shm
df -hP | helmet 2 | grep shm
Arguments¶
- $1 (int): Optional: number of header lines to protect (default: 1)
Exit codes¶
- 0: Always
Output on stdout¶
- Input lines after the protected header lines
helmet¶
Alias for text_helmet.