Shell Scripting Basics
Shell Scripting basically is a series of commands given to shell for its execution. From Writing any command to reading and executing it all can be done with the help of shell scripting. We can run a single executable command or a series of commands that are given as input to the shell for various output related executions anytime.
Kernel being the internal part of an OS that communicates with hardware and software uses the shell as the outer part to communicate with the user. We give inputs in the form of scripts, command, etc and execute it for the desired results.
Shell scripting provides us with proper command and a platform to execute the commands with the desired input and generate the output needed. It works as a mediator to talk with the system kernel and various OS components.
We can simply think it as of a path or a way to a door that connects with the room we need for. So basically having the knowledge for shell scripting will ease the way we are willing to execute our commands further. We can start or stop any application together by just writing a simple script or we can initialize anything needed at the boot time with the help of shell scripting. It reduces the effort of a user by writing a series of commands at once.
There are majorly two types of shell scripts:- BASH and C Shell
Shell Scripts are used for many purposes some of them are like:-
Let us see a simple example for Shell Scripting:-
#!/bin/bash
echo "Hello this is the Demo Run"
Simply saving the file with Demo.sh and running this will print on Hello this is the Demo Run on the terminal.
Programmers having good knowledge over script writing, Linux, Unix and kernel systems in OS will find it easy to understand and write scripts. Having knowledge over loops and basic variable command makes this shell scripting easy and understandable.
For the reader, you should have a basic knowledge of kernel and Linux and Unix. How to implement a logic and normal variables values used would be an added advantage.
By signing up, you agree to our Terms of Use and Privacy Policy.
By signing up, you agree to our Terms of Use and Privacy Policy.
Valuation, Hadoop, Excel, Web Development & many more.
This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy