pipr.tools
Pipes
Clean Email Strip formatting from pasted email for clean plain text Clean AI Output Clean plain text from ChatGPT or AI output Decode & Format JWT Decode a JWT and pretty-print header and payload Word Frequency Count word frequency in text

head Keep first N lines

Aa Text
Input0 chars
Output0 chars

Flags

--lines number default: 10

Examples

Preview the first 10 lines of an access log

Usage
"200 /api/users 12ms
404 /old-dashboard 3ms
200 /api/auth 45m..." | head

Preview the first few rows of a customer CSV export

Usage
"Name,Email,Plan,MRR
Alice,[email protected],Pro,$99
Bob,[email protected],..." | head

Show only the weekday entries from a schedule

Usage
"Monday: Team standup
Tuesday: Client call
Wednesday: Sprint ..." | head --lines=5
View source
(input, opts = {})=>{
                const n = parseInt(opts.lines) || 10;
                return input.split("\n").slice(0, n).join("\n");
            }