Next | 23 |
This has some problems
It leaves the last line of input trapped in the hold space
So:
$ { p;x; }
Address $ means "the last line of input"
After stashing it in the hold space, we print (p) the line that was there
(The next-to-last line)
Then we extract the last line again (x) and it is automatically printed
Next | Next |