strip last lines off pipe
I have a datastream going through a pipe,and I need to strip-out (remove) the last 3 lines (trailer) from that stream so that it doesn't go down to the next command in the stream.
ive tried combinations of head/tail, but that all assumes you know ahead of time how many lines are in the stream to begin with... |
Quote:
Code:
mycommand | head -n -3 Code:
-n, --lines=[-]K |
All times are GMT -5. The time now is 12:41 PM. |