RosettaCodeData/Task/Terminal-control-Cursor-movement/Mathematica/terminal-control-cursor-movement.math

14 lines
547 B
Text
Raw Permalink Normal View History

2013-04-11 01:07:29 -07:00
Run["tput cub1"] (* one position to the left *)
Run["tput cuf1" ] (* one position to the right *)
Run["tput cuu1" ] (* up one line *)
Run["tput cud1"] (* down one line *)
Run["tput cr"] (* beginning of line *)
Run["tput home"] (* top left corner *)
WIDTH=RunThrough["tput cols", ""];
HEIGHT=RunThrough["tput lines", ""];
Run["tput hpa "<>WIDTH] (* end of line *)
Run["tput cup "<>HEIGHT<>" "<> WIDTH] (* bottom right corner *)