[sf-lug] NEED INFO ABOUT BOOT SECTOR, SPACE LIMITS
Akkana Peck
akkana at shallowsky.com
Mon Jul 31 10:29:41 PDT 2017
Alex Kleider writes:
> Not being familiar with 'script' I gave it a try with the following results:
[ ... ]
> My question is why all the '^M's and '^['s? (..representing control
> characters I assume.) The output would be better off without them, me
> thinks.
Script stores everything the terminal sees, which includes carriage
returns (ctrl-M) in addition to the line feeds (ctrl-J) that Linux/Unix
normally uses as its newline character. Ctrl-[ is the escape
character; you're seeing it because you have escape sequences
in your prompt, maybe to colorize it or make it bold.
I agree that mostly they get in the way. Of course you can remove
them after the fact. For instance, you could run through through sed:
sed -r -e 's/\r//g' -e 's/\x1b/<ESC>/g'
(\r is the return character, 1b is hex for the escape character).
...Akkana
More information about the sf-lug
mailing list