Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tget(1) [minix man page]

TGET(1) 						      General Commands Manual							   TGET(1)

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 ( TGET(1)

Check Out this Related Man Page

captoinfo(1)						      General Commands Manual						      captoinfo(1)

captoinfo - Converts a termcap description into a terminfo description. SYNOPSIS
captoinfo [-v ...] [-V] [-1] [-w options] file... OPTIONS
Prints a field per line. Otherwise, multiple fields are printed on a line up to a maximum width of 60 characters. Outputs tracing infor- mation to standard error during program execution. Specifying more than one -v option causes more detailed information to be printed. Outputs to standard error, the version of the executing program. Outputs information according to the specified width (in characters). DESCRIPTION
The captoinfo command searches the specified file for termcap descriptions. For each description found, an equivalent terminfo description is written to standard output (along with any comments found). A description that is expressed as relative to another description (such as termcap tc = field) is reduced to the minimum superset before being output. If a file is not specified, the environment variable TERMCAP is used for the filename or entry. If TERMCAP is a full pathname to a file, only the name of the terminal specified by the environment variable TERM is extracted. If the environment variable TERMCAP is not set, then the file /usr/share/lib/termcap is read. FILES
Compiled terminal description database. SEE ALSO
Commands: infocmp(1) Functions: curses(3) Files: terminfo(4) captoinfo(1)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

for command

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)
Discussion started by: vasikaran
8 Replies

2. Shell Programming and Scripting

String Manipulation Question....

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)
Discussion started by: TheRocket
8 Replies

3. Shell Programming and Scripting

How to capture status code and echo a message

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)
Discussion started by: laknar
12 Replies

4. Shell Programming and Scripting

second line of the file

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)
Discussion started by: meetmano143
37 Replies

5. Shell Programming and Scripting

Replace variable length numeric string

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)
Discussion started by: mk4mzid
7 Replies

6. Shell Programming and Scripting

Search a specific string

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)
Discussion started by: zooby
10 Replies

7. Shell Programming and Scripting

Help with file editing while keeping file format intact

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)
Discussion started by: Mruda
8 Replies

8. Shell Programming and Scripting

PERL : Use of a variable in a tr

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)
Discussion started by: sinpeak
13 Replies

9. Shell Programming and Scripting

Script to check file exists

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)
Discussion started by: ch33ry
8 Replies

10. Shell Programming and Scripting

Reverse of a string

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)
Discussion started by: manishdivs
7 Replies

11. Shell Programming and Scripting

Simple echo problem

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)
Discussion started by: nickzourdos
7 Replies

12. Shell Programming and Scripting

bc error

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)
Discussion started by: timiksy
14 Replies

13. Shell Programming and Scripting

Retrieving data from 65th col (of each line) ?

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)
Discussion started by: Sunusernewbie
9 Replies

14. Shell Programming and Scripting

Check variable

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)
Discussion started by: JPad
8 Replies

15. Shell Programming and Scripting

Source functions from variable

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)
Discussion started by: SkySmart
8 Replies