How can I cause ctrl u from a bash script?
Ie I want to remove all characters left of cursor on a line, and put cursor in column 0.
A workaround could be printing \r
, followed by something to clear right of cursor.
I don't want to clear the whole terminal screen.
Update:
The solution I use (in PHP):
echo 'mydata' . "\033[0K\r";