Text after Control Sequence

Posted by SPAM SPAM SPAM SPAM on Super User See other posts from Super User or by SPAM SPAM SPAM SPAM
Published on 2012-11-11T15:57:37Z Indexed on 2012/11/11 17:04 UTC
Read the original article Hit count: 154

I am trying to parse the output of a command that expects to be writing to the screen. It has data separated by move-to-origin control sequences (for the VT220, ESC[1;1H). I only need the last part (i.e. after the last move-to-origin).

I have tried doing this multiple ways (primarily awk and sed), but the problem is always that parts of the control sequence have special meaning (to the program, not just to the shell), and I cannot quote them when I substitute tput's output.

Any suggestions?

© Super User or respective owner

Related posts about command-line

Related posts about sed