4
I have been a UNIX user for more years than I care to think about, and in that time I have been trained to expect that when contradictory switches are given to a program the last one wins. Recently I have noticed that
cat -bn file
and
cat -nb file
both use the -b option (number non-blank lines) over the -n option (number all lines). I get this behavior on both BSD and Linux, so I don't think it is an implementation quirk. Is this something that is specified somewhere and am I just crazy for expecting the first example to number all lines?
You say that
-bnumbers blank lines. It actually causes non-blank lines to be numbered according to every man page I looked at (Ubuntu/GNU, FreeBSD, HP/UX). – Paused until further notice. – 2010-06-10T05:51:58.557@Dennis Williamson, yes, you are correct, that is a typo. – Chas. Owens – 2010-06-10T20:49:10.213