This is not depending of the language. Use VT100 codes to control cursor, color, clear screens, and so on.