views:

22

answers:

0

can xterm can be used to process ANSI escape sequences and output the resulting text into a file?

i mean e.g. like this:

$ echo -e "\e[31mfoo\e[0m" | xterm -SOME_NICE_OPTION
foo

xterm has a slave mode, but i'm not sure whether it can be used to this type of task.

echo "foo" | xterm -S120

writes "foo" into xterm window

i have played with several file descriptor combinations, but haven't succeed