1

Is there an escape sequence which I can use to jump to an absolute column in OS X Yosemite Terminal or iTerm?

In other words:

echo 12345678901234567890
echo \StartAtColumn10 A10 \StartAtColumn2 B2

Would produce the following output:

12345678901234567890
 B2      A10

I want to send this code from R to format progress output.

1

You can use \r to return to the beginning of the line (column 1) and then \e[nC to move right n characters (column n+1). So:

$ echo 12345678901234567890; echo $'\r\e[9CA10' $'\r\e[1CB2'
12345678901234567890
 B2      A10
0

Not too sure what you are looking for, but I think you are looking something like column command. May be?

$ echo \A10 \B2 | column -s\ -t
A10 B2

For more info: man column.

  • That would surely work - but I want to send the output from R, ( cat() function). So I can not use a second command like column. – Rainer Jan 22 '15 at 16:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .