4 ms·
You can do "head -n 0" on Linux to mean "all lines". No you can't.
by raldi 14y ago
You can do "head -n 0" on Linux to mean "all lines".
No you can't.
- AgentConundrum 14y ago`head -n 99999` seems like a weird way to do it anyway. Wouldn't it make more sense to do `tail -n +1`? The output is the same from both commands, but `tail` doesn't require you to assume arbitrary limits. Honest question, btw. I'm relatively inexperienced with Linux, and I certainly haven't used BSD. I'd appreciate any critiques you may have to offer.
- Nick_C 14y ago> Wouldn't it make more sense to do `tail -n +1` Yes (or perhaps tail -n +0 as that is idiomatic, which makes it clear to anyone what you are intending).
- kleiba 14y agoShould probably be "head -n-0". The '-' between -n and 0 means "all but the last 0 lines".