|
|
|
|
|
by Calzifer
599 days ago
|
|
In most cases you could simply use a huge number of lines like head filename -n 1000000000
or use the "inverse mode". Head and tail can print all but the first/last n lines (I just have trouble to remember without man page the syntax and which does what).
So those are more "cat equivalents": head -n-0 filename
tail -n+0 filename
PS: for your wc example you could actually do just head -n $(wc -l filename)
because `wc` will print the number of lines and the filename. (does not work with spaces) |
|