I have some code:
char *tty_name = ttyname(STDIN_FILENO); char command = "/usr/sbin/writevt -t "; strcpy(stpcpy(command + 21, tty_name), " -T ' \r'"); system(command);
It writes a "space" and a "carriage return" to the current TTY. Which works fine for my uses. But, i'm wondering if there is a simpler way of achieving this? I've tried this:
echo -e " \r > $(tty)"
But, it isn't working.