Back-End Programming Exam  >  Back-End Programming Videos  >  Shell Scripting: Discovering to Automate Command-Line Tasks  >  Shell Scripting Tutorial-27: Do Cool Things With 'tput'

Shell Scripting Tutorial-27: Do Cool Things With 'tput' Video Lecture | Shell Scripting: Discovering to Automate Command-Line Tasks - Back-End Programming

62 videos

FAQs on Shell Scripting Tutorial-27: Do Cool Things With 'tput' Video Lecture - Shell Scripting: Discovering to Automate Command-Line Tasks - Back-End Programming

1. What is 'tput' in shell scripting?
Ans. 'tput' is a command in shell scripting that is used to control the terminal or console display. It allows us to manipulate various terminal attributes such as colors, cursor movement, screen clearing, etc.
2. How can 'tput' be used to change the text color in shell scripting?
Ans. 'tput' can be used to change the text color by using the 'setaf' capability. For example, to set the text color to red, we can use the command 'tput setaf 1'. The number 1 represents the color code for red. We can refer to the 'tput' documentation for the list of color codes for different colors.
3. Can 'tput' be used to move the cursor position in shell scripting?
Ans. Yes, 'tput' can be used to move the cursor position. The 'cup' capability of 'tput' can be used for this purpose. For example, 'tput cup 5 10' will move the cursor to row 5 and column 10 on the terminal screen.
4. How can 'tput' be used to clear the terminal screen in shell scripting?
Ans. To clear the terminal screen using 'tput', we can use the 'clear' capability. The command 'tput clear' will clear the entire terminal screen and move the cursor to the top-left corner.
5. Can 'tput' be used to change the text attributes like bold or underline in shell scripting?
Ans. Yes, 'tput' can be used to change the text attributes. The 'bold' and 'smul' capabilities of 'tput' can be used to make the text bold and underline, respectively. For example, 'tput bold' will make the text bold, and 'tput smul' will underline the text.
62 videos
Explore Courses for Back-End Programming exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Viva Questions

,

shortcuts and tricks

,

Exam

,

study material

,

Important questions

,

Summary

,

mock tests for examination

,

Sample Paper

,

MCQs

,

past year papers

,

Semester Notes

,

Extra Questions

,

Shell Scripting Tutorial-27: Do Cool Things With 'tput' Video Lecture | Shell Scripting: Discovering to Automate Command-Line Tasks - Back-End Programming

,

Shell Scripting Tutorial-27: Do Cool Things With 'tput' Video Lecture | Shell Scripting: Discovering to Automate Command-Line Tasks - Back-End Programming

,

ppt

,

Free

,

Previous Year Questions with Solutions

,

Shell Scripting Tutorial-27: Do Cool Things With 'tput' Video Lecture | Shell Scripting: Discovering to Automate Command-Line Tasks - Back-End Programming

,

video lectures

,

pdf

,

practice quizzes

,

Objective type Questions

;