Ruber Linden
Ruber Linden

Reputation: 31

Move cursor back to first column in shell script

I am beggining in shell script, which does some simple stuff. I have only a simple question:

After a printf, the cursor stays in a specific position of the screen. I want it to go back to the first column, on the same line, so I can use printf again on the same line. What is the best way to do this?

Thanks a lot, R.

Upvotes: 3

Views: 1427

Answers (1)

n. m. could be an AI
n. m. could be an AI

Reputation: 120021

Add \r to the end of the format string.

Upvotes: 3

Related Questions