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

Objective type Questions

,

ppt

,

Free

,

mock tests for examination

,

Important questions

,

past year papers

,

Sample Paper

,

MCQs

,

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

,

video lectures

,

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

,

Exam

,

Previous Year Questions with Solutions

,

pdf

,

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

,

Semester Notes

,

Summary

,

practice quizzes

,

Viva Questions

,

shortcuts and tricks

,

study material

,

Extra Questions

;