Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Usage of tput command

Posted on 2004-10-25
6
Medium Priority
?
456 Views
Last Modified: 2013-12-27
I need to do some formatting on the output generated by my script.
For example
echo "Output of df -k" #this should be displayed in bold and the output of df -k should be displayes as normal.

I know that I should use tput bold but this command is also making the output of df -k to be bold.

Any advice on this ....
0
Comment
Question by:madan1278
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 21

Expert Comment

by:tfewster
ID: 12399762
From `man tput`,
tput smso
echo "Output of df -k"
tput rmso
df -k
0
 
LVL 2

Accepted Solution

by:
rajeshp_69 earned 200 total points
ID: 12419661
tput smso will give a reverse video effect.
tput bold must work.
0
 
LVL 5

Expert Comment

by:ITcrow
ID: 12444506
tput bold
echo "Output of df -k"
tput rmso
df -k
0
 
LVL 5

Expert Comment

by:ITcrow
ID: 12444531
tput bold; echo "HELLO"; tput rmso ; echo "WORLD" ; tput bold ; echo "Good"; tput rmso ; echo "BYE"
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question