Reputation: 147
To be more specific, I am looking for an equivalent to the Windows API function: WriteConsoleOutputCharacter. I know this style of direct output is possible, as I have seen the behaviour used before in the time that I have used Linux. However, I am still a baby when it comes to Linux specific C libraries, and have not been able to ascertain any clues as to where I may find such functionality. Any assistance would be appreciated.
Upvotes: 1
Views: 1809
Reputation: 19
This line will put a clock in right upper conner of a terminal (from commandlinefu.com)
while sleep 1;do tput sc;tput cup 0 $(($(tput cols)-29));date;tput rc;done
Upvotes: -1
Reputation: 19
You can use the ANSI control sequence
Say, following will print 'ddd' string 3 lines above the prompt in bash
echo -e "\e[3Addd"
Upvotes: 2