Shell Scripting FAQ’s
Shell Scripting Online Training in Ameerpet Hyderabad
We are providing Shell Scripting Online Training in Ameerpet Hyderabad. We are one of best Institute to provide Best High Quality Shell Scripting online training all over India. The IT Professionals and Students from India and abroad who are unable to attend regular classes can attend our Shell Scripting online training from their home in their convenient timings. For more details on Shell Scripting Online Training and Shell Scripting FAQ’s please call to 9290971883, / 9247461324, or drop a mail to revanthonlinetraining@gmail.com
2. Can you name some of its advantages?
The two main advantages of shell scripting:
- It facilitates developing your own custom OS with relevant features which best suit your needs.
- It facilitates designing software applications according to their respective platforms.
3. What are the different types of commonly used shells on a typical Linux system?
csh,ksh,bash,Bourne . The most commonly used and advanced shell used today is "Bash" .
4. What are the different types of variables used in Shell Script?
A shell script has two types of variables :
System-defined variables - they are created/defined by the Operating System(Linux) itself. These variables are generally defined in Capital Letters and can be viewed by “set” command.
User-defined variables - they are created or defined by system users and the values of variables can be viewed by using the command “echo”.
5. What is the equivalent of a file shortcut that we have a window on a Linux system?
Shortcuts are created using "links" on Linux. There are two types of links that can be used namely "soft link" and "hard link".
6. What is the difference between soft and hard links?
Soft link is link to the file name and can reside on different filesytem as well. The hard link is the link to the inode of the file and have to be on the same filesytem as that of the file. Deleting the original file makes the soft link inactive (broken link) but does not affect the hard link (Hard link will still access a copy of the file)
7. What are the different types of commonly used shells on a typical Linux system?
There are mainly two kinds of shells in Linux OS, namely, Bourne Shell and C-Shell. Examples of derivative from each are as follows;
Bourne Shell: Bourne Shell, Bourne-Again Shell, Korn Shell, POSIX Shell.
C-Shell: C-Shell, TENEX C-Shell, Z-Shell
8. How will you pass and access arguments to a script in Linux?
Arguments can be passed as:
scriptName "Arg1" "Arg2"…."Argn" and can be accessed inside the script as $1 , $2 .. $n
9. What is GUI scripting?
GUI scripting is used for controlling a computer and its applications. GUI scripting supports different applications. It mostly depends on the operating system.
10. What is the significance of $#?
$# shows the count of the arguments passed to the script.
11. Can you differentiate between single quotes and double quotes?
We use single quotes where we don’t want to perform the variables’ evaluation to values.
We use double quotes where we want to perform the variables’ evaluation to values.
12. What is the difference between $* and $@?
$@ treats each quoted arguments as separate arguments but $* will consider the entire set of positional parameters as a single string.
13. What are the various stages of a Linux process it passes through?
A Linux process passes through four stages:
Waiting: The Linux process waits for the resource.
Running: The Linux process is currently being executed.
Stopped: The Linux process is stopped after successful execution.
Zombie: The process has stopped but is still active in the process table.
14. Explain “Positional Parameters.”
Positional parameters are the variables defined by a Shell. They are used to pass information to the program by specifying arguments in the command line.
15. How will you compare the strings in a Shell Script?
The test command is used to compare the text strings. The test command compares text strings by comparing each character in each string.
16. What is the importance of the Shebang line?
The Shebang line remains at the script’s top. It gives information about the location where the engine is, which executes the script.
17. How many Shells and Kernels are available in a UNIX environment?
A UNIX environment has only one Kernel and there are multiple Shells available.
18. Where are the Shell programs stored ?
The Shell programs are stored in a file called sh.
19. Define “IFS.”
IFS refers to Internal Field Separator. It is a system variable whose default value is space, tab, following by a new line. IFS denotes where a field or word ends in a line and where another begins.
20. Do you need a separate compiler to execute a Shell program?
No, we don’t need a separate compiler to execute a Shell program. Since Shell itself is a command-line in the shell program and executes them.
Shell Scripting FAQ’s
Institute Address :
B1, 3rd Floor, Eureka Court, Near Image Hospital, Ameerpet, Hyderabad, India
Other Courses :
Digital Marketing Online Training