Skip to main content
5 events
when toggle format what by license comment
Mar 8, 2012 at 6:48 comment added Peter.O Aha... I was seeing it as \0, 1, 2 (or even \, 0, 1, 2). I'm not well enough attuned to octal it seems.. Thanks.
Mar 8, 2012 at 0:58 comment added Kyle Jones @Peter Thanks for catching that. I'd have sworn I tested the sed example. :( I've changed it to your version. Regarding \012: it is needed otherwise tr will eat the newlines.
Mar 8, 2012 at 0:56 history edited Kyle Jones CC BY-SA 3.0
fixed sed example, which actually did not work.
Mar 8, 2012 at 0:48 comment added Peter.O For sed, ^.* is greedy and consumes all but the last digit, and + needs to be \+ or else use the posix \([0-9][0-9]*\).... and in any case 's/[^0-9]*//g' works just as well, ... Thanks for the tr -c` example, but isn't that trailing \012 surperfluous?
Mar 7, 2012 at 21:53 history answered Kyle Jones CC BY-SA 3.0