Skip to content
Advertisement

Tag: ansi-escape

advanced printf explanation in bash

I just found this programming segment in my son’s Bash file. I am quite a newbie and unable to understand the printf syntax. Can someone explain me the COMMENTED printf in the segment below?? Answer It’s is nothing but a busy/wait spinner and the lines commented do nothing but set a blue foreground color and the last erases the line

How to capture escape sequences sent by terminal?

How would one capture the escape sequences as they are sent by a terminal application (say Konsole for example) ? For example, if you hit PgDown, what is sent to the virtual console ? I would like to record the byte stream sent to the virtual console (like when I hit “Ctrl+C” what escape sequence it produced) to a file

Advertisement