MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

UNIX

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
____ command is used to control the movement of the cursor on the screen.
A
mkdir
B
echo
C
tput
D
tty
Explanation: 

Detailed explanation-1: -Description. The tput command uses the terminfo database to make terminal-dependent information available to the shell. The tput command outputs a string if the attribute CapabilityName is of type string. The output string is an integer if the attribute is of type integer.

Detailed explanation-2: -tput : Portable Terminal Control. The tput command allows shell scripts to do things like clear the screen, underline text, and center text no matter how wide the screen is. To do these things, it translates the terminal-independent name of a terminal capability into its actual value for the terminal type being used.

Detailed explanation-3: -Cursor movement commands are used to position the cursor anywhere in an item without altering the text. Moves the cursor forward (right) one character. Moves the cursor back (left) one character. Moves the cursor down one line.

Detailed explanation-4: -sgr is short for “Select Graphic Rendition", which is also known as “Set Attribute” (see the terminfo(5) manual; man 5 terminfo ). What you are most likely using is sgr0 though, which resets all set attributes. Follow this answer to receive notifications.

There is 1 question to complete.