Interview Questions on Shell Script
1. What is Shell Script?
A shell script is a program file that runs unix commands based on the conditions for a UNIX-based operating system.
2. What are the types of shell?
Two main types of shells:
The Bourne shell :- If you are using a Bourne-type shell, the default prompt is the $ character.
The C shell :- If you are using a C-type shell, the default prompt is the % character.
3. Write sample program in shell script?
#!/bin/bash
clear
echo “Hello World"
4. How to write comments in shell script?
Start with # and then write comment lines.
Ex :-
# Commnets goes here
5. What is the extension of shell script?
Generally we use .sh extension for shell sctipt.