Pete's Linux Advent Calendar 2007

The 7th day

Up and Down

With tput(1) you can position the cursor in your terminal. Here are two scripts up and down that moves the cursor to the first or last line.
#!/bin/bash
# up - move cursor to the first line
tput cup 0 0

#!/bin/bash
# down - move cursor to the last line
tput cup $(tput lines) 0
I hope you find these useful as well!
Pete's Linux Advent Calendar 2007

Valid HTML 4.01!

Comments? send mail to pkruse@arcor.de my monogram