Shell Scripting Interview Questions & Answers part 3

0
748

Q: – How do you write a while loop in shell?

Use While Loop

Q: – How do you read keyboard input in shell scripts?

Use read command

Q: – What is GUI Scripting?

Graphical user interface provided the much needed thrust for controlling a computer and its applications. This form of language simplified repetitive actions. Support for different applications mostly depends upon the operating system. These interact with menus, buttons, etc.

Q: – Explain the term “loops”?

Loops enable you to execute a series of commands multiple times. Two main types of loops are the while and for loops.

Q: – What is “Nested Loops”?

When a loop is located inside the body of another loop it is said to be nested within another loop.

Q: – What is “Infinite Loops”?

Loops that execute forever without terminating.

Q: – What is “File Descriptor”?

An integer that is associated with a file. Enables you to read and write from a file using the integer instead of the file's name.

Q: – Explain “STDIN”?

STDINStandard Input. User input is read from STDIN. The file descriptor for STDIN is 0.

Q: – Explain “STDOUT”?

STDOUTStandard Output. The output of scripts is usually to STDOUT. The file descriptor for STDOUT is 1.

Submitted By:-Naveen Kumar            Email-ID: – naveenkumar.13@ibibo.com

SHARE

LEAVE A REPLY