I'm using gawk (4.1.3) and it seems I have struck upon a trivial problem. The backspace character doesn't seem to work if it is immediately followed by a newline.
awk 'BEGIN{for(i=1;i<=3;i++) printf("%d,",i); printf("\b\n")}'
gives me 1,2,3,
(the last comma isn't gone)
This doesn't get resolved even if I put the \n
in a new printf
function.
However, if I insert any character between \b
and \n
(for instance, a space), it works.
If I remove \n
it again works.
What is this issue?