RosettaCodeData/Task/Terminal-control-Cursor-movement/UNIX-Shell/terminal-control-cursor-movement.sh
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

14 lines
483 B
Bash

tput cub1 # one position to the left
tput cuf1 # one position to the right
tput cuu1 # up one line
tput cud1 # down one line
tput cr # beginning of line
tput home # top left corner
# For line ends and bottom, we need to determine size
# of terminal
WIDTH=`tput cols`
HEIGHT=`tput lines`
tput hpa $WIDTH # end of line
tput cup $HEIGHT $WIDTH # bottom right corner