Ask Your Question
1

Is it possible to prevent the override of the last printed line on the Linux terminal?

asked 2021-09-17 11:00:00 +0000

devzero gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-06-15 17:00:00 +0000

plato gravatar image

Yes, it is possible to prevent the override of the last printed line on the Linux terminal by using the "\r" (carriage return) character instead of the "\n" (new line) character at the end of the line. This will move the cursor to the beginning of the same line instead of creating a new line, allowing you to print additional text on the same line without overriding the previous content.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-09-17 11:00:00 +0000

Seen: 11 times

Last updated: Jun 15 '21