Is it possible to make lpstat
output print jobs in reverse order, from newer to older?
Starting from the end of file?
Currently we see in the output the first sent document, then the second, etc.
I have more than 5K jobs and I want to output only the ones new for me, cancelling the cycle once I reach the last job id I printed in screen.
Yes, you can using
tac
:If you want to revert order only, let say, last 10 lines, combine your command with
tail
: