Take a look at the two command below.
The first will give you your terminal size in lines, columns.
IF your terminal can do it, (xterm for example), the second will auto adjust it for you...
The 24 and 80 in the 'printf' statement can be anything to ALMOST the size of your desktop...
I want to get the screen width and cursor positions.
When I used curses, all the screen content was cleared.
So Can I use curses to get the screen size without clearing anything in the window?
Or is there any other alternative???
I can use only C or C++. (0 Replies)
Hi,
Pleae help me on this. Normally, when we say read username, the cursor will come in the first position of next line, but I want the output of the below
Normal usage
-------------
please enter username:
_
I want like the below
----------------------
please enter username:
... (2 Replies)
Hi to all!
I'm a teacher of maths and physics in an italian high school in Milan, Italy.
I need a simple program that read the position of mouse cursor in function of time and write the coordinates in a text file. The time resolution have to be something like 1/10 sec or better (I have to know... (2 Replies)
hi all,
am trying to modify a ksh script to group server names together depending on the cluster they sit in. currently the script does a
find . -name '*.pid'
to find all running servers and prints out their pids and names.
current output looks something like this :
serverA ... (1 Reply)
I need to get the cursor position, and put it inside a variable. Problem is, i don't have the tput command, or ncurses.
Apparently I was supposed to try the following:
echo -e '\E
But I don't get a value or anything. Please help. (3 Replies)
Hi there.
It's easier to explain this with a pseudo code, I hope this makes sense:
var1=hello
echo $var1
some kind of loop
echo loop counter
done
How do I hold the cursor position immediately behind the last output so I'd get something like:
hello123456789
DOS used to use ","... (5 Replies)
Discussion started by: MuntyScrunt
5 Replies
LEARN ABOUT HPUX
tput
tput(1) General Commands Manual tput(1)NAME
tput - query terminfo database
SYNOPSIS
type] capname...
type] capname [parms...]
DESCRIPTION
The command uses the database to make terminal-dependent capabilities and information available to the shell (see terminfo(4)). The com-
mand outputs a string if the attribute (capname) is of type string, or an integer if the attribute is of type integer. If the attribute is
of type boolean, simply sets the exit code for TRUE, for FALSE), and produces no output.
Command-line Arguments
The command recognizes the following command-line arguments:
Indicates the type of terminal.
Normally this flag is unnecessary because the default is taken from the environment variable
capname Indicates the attribute from the database. See terminfo(4). In addition, the following capnames are supported:
Echo the clear-screen sequence for the current terminal.
Echo the initialize sequence for the current terminal.
Echo the sequence that will reset the current terminal.
parms If the capname takes optional numeric parameters, the parms will be placed in the string output by
The capnames are read from stdin and multiple capnames are allowed. Only one capname is allowed per line when reading
from stdin.
EXTERNAL INFLUENCES
Environment Variables
determines the locale to use. This overrides settings of other environment variables.
determines the language to use for messages.
determines the terminal type if the option is not specified.
EXAMPLES
Echo clear-screen sequence for the current terminal.
Print the number of columns for the current terminal.
Print the number of columns for the 70092 terminal.
Set shell variable to stand-out-mode sequence for current terminal.
This might be followed by a prompt:
Set exit code to indicate if current terminal is a hard copy terminal.
Clear the screen, move the cursor to line 10, column 20 and turn on bold.
RETURN VALUE
If capname is of type boolean, then the exit code is set to for true and for false.
If capname is not of type boolean and fails, an error message is printed, and exit code is set to one of the following depending on the
failure:
The capability name is of type integer and does not exist.
Usage error.
Unknown terminal type.
Unknown capability name.
An error occurred.
If the exit code is a is printed if a capability name of type integer is requested for a terminal that has no entry for that capability
name in the database (such as
FILES
Terminfo data base
Definition files
SEE ALSO
stty(1), untic(1M), terminfo(4).
STANDARDS CONFORMANCE tput(1)