Tuesday, April 20, 2010
Posted by venu k
24 comments | 6:05 AM
Using tput command:#!/bin/bash# SCRIPT: digclock.sh# USAGE: ./digiclock &# PURPOSE: Displays time and date in the top right corner of the# screen using tput command.# To stop this digclock use command "kill pid"####################################################################################### VARIABLE DECLARATION ################### # To place the clock on the appropriate column, subtract the # length of $Time and $Date, which...
Sunday, April 18, 2010
Posted by venu k
12 comments | 8:19 AM
Using ANSI escape sequences : ANSI escape sequences or tput allow you to move the cursor around thescreen at will. This is more useful for full screen user interfacesgenerated by shell scripts, but can also be used in prompts.The movement escape sequences are as follows: - Position the Cursor: \033[<L>;<C>H Or \033[<L>;<C>f puts the cursor at line L and column C. - Move the cursor up N lines: \033[<N>A - Move the cursor down N lines: \033[<N>B...
Subscribe to:
Posts (Atom)