Solved

Usage of tput command

Posted on 2004-10-25
446 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
Question by:madan1278
    4 Comments
     
    LVL 20

    Expert Comment

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

    Accepted Solution

    by:
    tput smso will give a reverse video effect.
    tput bold must work.
    0
     
    LVL 5

    Expert Comment

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

    Expert Comment

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Learn The Basics of Ethical Hacking & Pen Testing

    Computer and network security is one of the fastest growing and most essential industries in technology, meaning companies will pay big bucks for ethical hackers. This is the perfect course to leap into this lucrative career, learning how to use ethical hacking to reveal ...

    Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
    Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

    913 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

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now