Sponsored Content
Top Forums Shell Programming and Scripting Print Bold in Shell scripting Post 302961050 by cjcox on Monday 23rd of November 2015 10:17:35 AM
Old 11-23-2015
You may find the following to be better (?)

Code:
boldon=`tput bold`
boldoff=`tput sgr0`

And Robin, thank you for not suggesting hardcoding terminal escapes!!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies

2. Shell Programming and Scripting

Bold characters in c shell

Hi, Can someone tell me how to display characters in Bold in C shell?? (9 Replies)
Discussion started by: hemangi13
9 Replies

3. Shell Programming and Scripting

Bold characters in a file using Shell script

Hi, When I am running below mentioned script then the characters become bold but after opening the same file in Windows, Instead of getting bold characters i am getting some garbage value for \033Kunal Dixit Output in Windows (after ftp the file): but in windows , i am getting My name is... (0 Replies)
Discussion started by: kunal_dixit
0 Replies

4. Shell Programming and Scripting

Call Shell scripting from Perl Scripting.

Hi How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies

5. Shell Programming and Scripting

Bold 1 word in a shell script

I want to bold one word in shell script. I want the value for num bold when it is inputted. My code does not bold the value. It's like its not even there. echo -n "Please read a number" read num ; echo "${bold} $num ${offbold}" Thank you, Ccccc (6 Replies)
Discussion started by: Ccccc
6 Replies

6. What is on Your Mind?

Shell scripting vs Perl scripting

Hi all, I would like to start developping some good scripting skills. Do you think it would be best to start with shell scripting or Perl? I already got a fundation, really basics, in perl. but I am wondering what would be best to be good at first. Can you please help me determine which one to... (14 Replies)
Discussion started by: Pouchie1
14 Replies

7. What is on Your Mind?

Shell Scripting vs Perl scripting

Gents, I have been working in a Solaris/Unix environment for about 9 months. I took some linux classses online before getting the job. But, I am not very good at scripting. I want to learn how to script. Do you think that I should start with Shell scripting or Perl? I wanted to continue with... (2 Replies)
Discussion started by: Pouchie1
2 Replies

8. Web Development

Perl scripting or shell scripting?

i am going to study any one of the scripting languages mentioned above(shell 0r perl scripting) . Which is having more scope for a fresher? (1 Reply)
Discussion started by: Anna Hussie
1 Replies

9. Shell Programming and Scripting

Color Underline and Bold letter in shell script

Hi All, This is my first port..... I am using AIX 5L, installed 10g database. On daily basis we takes rman backup. This backup status info strored in a log file. I write a script to know the status of back means I will fire this script and this script will send a mail to me. #!/bin/bash... (16 Replies)
Discussion started by: mcagaurav
16 Replies

10. Shell Programming and Scripting

Shell Scripting , need to search and print a line that contains a specific pattern

Take example of below file. abc.txt nas1:/abc/test/test1 /test nas1:/abc/test/test1/test2 /test/abc nas1:/abc/test/ Now i have a variable that contains "nas1:/abc/test/test1" value , so i need to search the above file for this variable and print only this line. ... (14 Replies)
Discussion started by: mohit_vardhani
14 Replies
TPUT(1) 						    BSD General Commands Manual 						   TPUT(1)

NAME
tput, clear -- terminal capability interface SYNOPSIS
tput [-T term] attribute [attribute-args] ... DESCRIPTION
tput makes terminal-dependent information available to users or shell applications. The options are as follows: -T The terminal name as specified in the terminfo(5) database, for example, ``vt100'' or ``xterm''. If not specified, tput retrieves the ``TERM'' variable from the environment. tput outputs a string if the attribute is of type string; a number if it is of type integer. Otherwise, tput exits 0 if the terminal has the capability and 1 if it does not, without further action. If the attribute is of type string, and takes arguments (e.g. cursor movement, the terminfo ``cup'' sequence) the arguments are taken from the command line immediately following the attribute. The following special attributes are available: clear Clear the screen (the terminfo(5) ``cl'' sequence). init Initialize the terminal (the terminfo(5) ``is2'' sequence). longname Print the descriptive name of the user's terminal type. reset Reset the terminal (the terminfo(5) ``rs1, rs2, rs3'' and ``rf'' sequence). EXIT STATUS
The exit status of tput is based on the last attribute specified. If the attribute is of type string or of type integer, tput exits 0 if the attribute is defined for this terminal type and 1 if it is not. If the attribute is of type boolean, tput exits 0 if the terminal has this attribute, and 1 if it does not. tput exits 2 if any error occurred. EXAMPLES
tput cl cm 5 10 clear the screen and goto line 5 column 10 tput cm 6 11 DC 6 goto line 6 column 11 and delete 6 characters SEE ALSO
termcap(3), termcap(5) HISTORY
The tput command appears in 4.4BSD. BUGS
tput can't really distinguish between different types of attributes. Not all terminfo entries contain the reset sequence, so using the init sequence may be more useful. BSD
September 29, 2009 BSD
All times are GMT -4. The time now is 09:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy