TGET(1) General Commands Manual TGET(1)NAME
tget - get termcap values
SYNOPSIS
tget [-flag id] [-num id] [-str id] [-goto col line] [[-echo] string]
DESCRIPTION
Tget allows shell scripts access to the termcap(3) functions. Flags, numbers and strings can be queried from the termcap database under
the entry denoted by the environment variable $TERM.
OPTIONS -flag id
Set the exit status to zero if the flag id is set. All other options except -echo set the exit status to id being available or not.
The last option sets the final exit code.
-num id
Print the value of the numeric variable id.
-str id
Print the value of the string variable id.
-goto col line
Generates instructions to go to the given column and line if the cm capability exists.
-echo string
Prints string. Any other argument that does not start with a dash is also printed.
EXAMPLE
Try this: tget -str so 'Reverse Video' -str se
ENVIRONMENT
TERM Terminal type.
TERMCAP Path to the termcap database, by default /etc/termcap:/usr/etc/termcap.
SEE ALSO termcap(3).
DIAGNOSTICS
Tget will fail immediately with a descriptive message if the termcap entry can't be found.
AUTHOR
Kees J. Bot (kjb@cs.vu.nl)
TGET(1)
Check Out this Related Man Page
captoinfo(1M) System Administration Commands captoinfo(1M)NAME
captoinfo - convert a termcap description into a terminfo description
SYNOPSIS
captoinfo [-1] [-v...] [-V] [-w width] filename...
DESCRIPTION
captoinfo looks in filename for termcap descriptions. For each one found, an equivalent terminfo description is written to standard out-
put, along with any comments found. A description which is expressed as relative to another description (as specified in the termcap tc =
field) is reduced to the minimum superset before being displayed.
If no filename is given, then the environment variable TERMCAP is used for the filename or entry. If TERMCAP is a full pathname to a file,
only the terminal whose name is specified in the environment variable TERM is extracted from that file. If the environment variable TERMCAP
is not set, then the file /usr/share/lib/termcap is read.
OPTIONS -1 Display the fields one to a line. Otherwise, the fields are printed several to a line, with a maximum width of 60 charac-
ters.
-v Display tracing information on the standard error as the program runs. Specifying additional -v options displays more
detailed information.
-V Display the version of the program in use on the standard error and then exit.
-w width Change the output to width characters.
FILES
/usr/share/lib/terminfo/?/* compiled terminal description database
/usr/share/lib/termcap
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO infocmp(1M), curses(3CURSES), terminfo(4), attributes(5)NOTES
captoinfo should be used to convert termcap entries to terminfo entries because the termcap database may not be supplied in future
releases.
SunOS 5.10 18 May 1993 captoinfo(1M)
Hi,
I am running this command, to know abt the "for" loop command
echo " enter how many numbers you want to give"
read num
for i in 1 .. num
do
echo "Hi this is the $i message"
done
if i give the input as 3 then
i shd get the output like
Hi this is the 1 message
Hi this is... (8 Replies)
Say I've got a string like: data1,data2,data3,data4.
How would I be able to break up the string, so that I have four variables w/ the values data1 data2 data3 data4.
Also, how could I read a string character by character.
I know you can read a sentence word by word by using the
for var... (8 Replies)
Im trying to execute application and its return code is below
IF Status code=o
echo "........"
else Staus Code =-2 DJRE
then echo "......"
Can any one help me how to handle the status code and echo some message. (12 Replies)
Im trying to get the frist two line of a file as a variables.
input file
/tmp/tmp.txt
1226037463l
1226037422ll
while read -r LINE
do
if ;
then
FRIST=`echo $LINE | awk -F"|" 'NR==1''{print $1}'`
echo $FRIST
SECOND=`echo $LINE | awk -F"|"... (37 Replies)
I have a customer who logged some cc and bank account numbers in their apache logs. I got the cc numbers x'd out with
sed -e 's/args=\{16\}/args=XXXXXXXXXXXXXXXX/g' -e 's/cardnum=\{16\}/cardnum=XXXXXXXXXXXXXXXX/g'but that wasn't too difficult due to the value being 16 digits.
The bank account... (7 Replies)
Hi,
I have following requirement. Pls suggest.
To search a string in a file which is combination of character and number(always 9 digit, but numeric). if found then caputure the exit return code as 0 else 1 , if 0 then next job can be triggerd. If exit code is 1, should return a failure... (10 Replies)
Hi,
I am having a file which is fix length and comma seperated. And I want to replace values for one column.
I am reading file line by line in variable $LINE and then replacing the string.
Problem is after changing value and writing new file temp5.txt, formating of original file is getting... (8 Replies)
Hi,
I want to count the number of occurences of a character in a string variable ($str). The character is stored in a another variable ($sepchr). I am using tr as :
$count = ($str =~ tr/$sepchr//);
This did not work. I found in another thread about using eval. I used eval as :
... (13 Replies)
Hi,
I am trying to write a script which checks if any file exists with "*.log" or "*.out" in Directory
below is the code
#------------------
path=/abd/xyz/
if ; then
echo "Good"
else
echo "Failure"
fi
#--------------------------
its always going to else part and printing... (8 Replies)
Hi All,
I have a String str="Manish". I would like to reverse it.
I know the option to do this in bash is: echo "Manish" | rev
but I have seen an alternate solution somewhere, which states that:
str="Manish" echo $str | awk '{ for(i=length($0);i>=1;i--) printf("%s",substr($0,i,1));... (7 Replies)
Hey all! I'm in an intro to UNIX class at university, and we've just began writing scripts. Naturally I can't get it to do what I want.
Basic script as follows:
COMPARE1=`ls|wc -l`
tar czf archive.tgz ~/path/to/file
COMPARE2=`tar tvzf archive.tgz|wc -l`
if
then
... (7 Replies)
Whenever I use bc to compare two numbers, I get a "syntax error on line 1, teletype" error. I've tried simpler expressions like
echo '1 > 2' | bc
...but the error still occurs. Is it a problem with versions? If so, how should I fix it? (14 Replies)
Hello Friends,
I am in situation where I have to note down few SQL queries from specific hexdump format. Here is an example (the query text starts at 65th character on each line)
----------------------
0x000007FEB0E701C0 : 7365 6C65 6374 2063 7573 746E 6F2C 2020 select custno, ... (9 Replies)
Hi people,
I would like to start a review of my config variable to check whether they have been changed and if not then there is only an echo. If they have been changed to my other commands are executed.
I hope you can help me.
with best regards
JPad
edit:
here my code
if ;... (8 Replies)
I have a functions file containing functions:
file.functions:
myTest () {
echo "MYPWD=$(echo $(pwd))"
echo "MYLOGNAME=${LOGNAME}"
}
myCar () {
echo "MYDATE=$(date)"
echo "MYUPTIME=$(uptime)"
}
i know i can source this file in another script using something similar to this:
source... (8 Replies)