Ah, the delights of non-standard standards...
Apparently, OSX sed, unlike GNU sed, does not interpret ';' as a newline.
To get it to work, either
Code:
sed -n -e '${' -e 's/.* //' -e p -e '}'
or
Code:
sed -n '${
s/.* //
p
}'
may work. However, your original solution for these lines now definitely
win out in terms of elegance.
Oh well, I've demonstrated there's more than one way to do it, at any rate. And you can do some mighty cool stuff with multi-line sed...