Prev Next

Tools / Shell Scripting Interview Questions

1. What is a shell?

Shell is an interface between the user and the kernel. Even though there can be only one kernel; a system can have many shells running simultaneously. So, whenever a user enters a command through the keyboard, the shell communicates with the kernel to execute it and then displays the output to th...

Read full answer

2. What is Shell Scripting?

Shell Scripting is an open-source computer program designed to be run by the Unix/Linux shell. Shell Scripting is a program to write a series of commands for the shell to execute. It can combine lengthy and repetitive sequences of commands into a single and simple script that can be stored and ex...

Read full answer

3. Different types of commonly used shells on a typical Linux system.

Different shells include csh, ksh, bash (Bourne Again Shell), and Bourne. The most commonly used shell is "Bash" .

Read full answer

4. What is a Symlink?

A symlink or a Symbolic Link is simply enough a shortcut to another file. It is a file that points to another file.To create a symbolic link you use the following command: ln -s target_path link_path For example, the below command creates a symlink MY_DIR for the actual directory my_folder. ln -s...

Read full answer

5. Why is shell scripting required?

Shell helps in doing work that is repetitive in nature. For example: When executing a bunch of commands, shells can take all these commands directly from a stored file and execute them, instead of writing them every time. Used to run routine backups/tasks by admins. They are easier to write and d...

Read full answer

6. What is a Shell Variable?

− A shell variable is a special variable that is set by the shell and is required by the shell in order to function correctly. Some of these variables are environment variables whereas others are local variables. #!/bin/sh NAME = "Javapedia.net" unset NAME echo $NAME

Read full answer

7. Mention few limitations of shell scripting?

There may be errors in shell scripting that prove to be quite costly. The programs in shell script are quite slow while executing and a new process is required for every shell command executed. Different platforms in shell scripting may also have compatibility problems. Large, complex tasks aren'...

Read full answer

8. What is the extension of Shell program files?

Shell programs are stored in files with .sh extensions. For example. CleanupScript.sh.

Read full answer

9. What are the different types of shells?

Shells are divided into two categories: Bourne shell: The $ character is the default prompt when using a Bourne-type shell. C shell: The % character is the default prompt. There 2 sub categories of Bourne shell: Bourne Again shell (BASH) : Bash or Bourne Again Shell is the similar shell to Bourne...

Read full answer

10. Differences between CSH and BASH.

BASH CSH Bourne Again Shell starts with ';'. C-Shell commands begin with a '#'. Bash is considered as non- interactive. CSH stands for the interactive terminal. Easy to understand. The difficulty level is intermediate.

Read full answer

«
»

Comments & Discussions