- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Why do we need shell scripting?
Shell is a software program that acts as a mediator between the kernel and the user. It reads the commands and interrupts by sending requests to execute a program. So, the shell is known as a command interpreter.
It contains almost 100 system calls. It tells the kernel to carry out various tasks for the program. These tasks are as follows −
Opening a file.
Writing a file.
Obtaining information about a file.
Terminating a process.
Changing the priority of processes.
Getting the time and date.
Need of shell scripting
Let us see the reasons for using shell scripts which are given below −
Shell helps in doing work which is repetitive in nature. For example: When executing a bunch of commands, often, shells can take all these commands directly from a stored file and execute it, instead of writing them again every time.
They are used to get routine backups by admins.
They are easier to write and debug than other programming languages like C or C++.
We can transfer the shell script to other UNIX and similar operating systems and execute.
Shell scripts are also used to monitor systems regularly.
Now let us see different shells used in different operating systems, which are as follows −
The shells used on Linux operating system are as follows −
The Korn Shell,
The shells used on UNIX operating system are as follows −
The Korn Shell
The C Shell
The shells used on Windows operating system are as follows −
- Why do we need KDD?
- Why do we need a Database
- Why do we need Good Manners?
- Why do we need Computer Networks?
- Why do we need Data Encryption?
- Why do we need generics in Java?
- Why do we need inner classes in Java?
- Why do we need a separate Data Warehouse?
- Basic Operators in Shell Scripting
- Why do we need a wrapper class in Java?
- What is BGP and why do we need it?
- Why do we need a pure virtual destructor in C++?
- Why do fathers need Paternity Leave?
- Why do I need Babel JS?