What is shell script?

Share this post to your friends !

This entry is part 1 of 6 in the series Writing your first script
What is shell script?
5 (100%) 1 vote[s]

WriteBash - In this article, I will introduce you to the shell script. If you have determined that you will be working with a Linux system, make sure you work with the command line very well. Linux operating systems provide users with a tool to work with operating systems called shell. So what is a shell? And what is a shell script?

What is a shell?

In Linux operating systems, there is an especially important part called kernel. It helps to communicate between operating systems, users, applications with hardware. Every operation, every program that a user executes must pass through the kernel.

In this article, we will not go to find out what the kernel is. Through the image below, you can see where the kernel is located in a system.

what-is-shell-script-01 What is shell script?
Linux operating system architecture. Source: internet.

Back to the question in this section, What is a shell? As you can see, the kernel manages all programs, resources. But you can not edit directly on the kernel (unless you are an operating system developer), so you need an intermediate program, shell is born.

Shell is an interactive interface between the user and the kernel. Shell programs will interpreter the user’s commands into system commands and execute commands.

Of course, Linux desktop operating systems now have graphical user interfaces. But we are talking here of people who work with the Linux command line system: linux system administrators, linux system programmers … And to work with the shell, we need the terminal window. All current linux OSs are built-in.

What is a shell script?

User commands can be received through two ways: interacting through terminal windows or through scripts.

So, the shell script is a script file that contains user commands written sequentially from top to bottom. Shell programs will read the script from top to bottom and interpret it (not compiled it) through the kernel.

what-is-shell-script-02 What is shell script?
An example of a shell script.

Some common shell types

In the Unix/Linux world there are many shell …

Shell Bourne (sh)

As Steven Bourne writes, it’s the primitive shell that is present on most Unix/Linux systems. It is very useful for shell programming but it does not handle user interaction like other shell.

Bourne Again Shell (bash)

This is an extension of sh, which inherits what sh already has and what it does not have. It has a very powerful and flexible programming interface. Along with the easy to use command line interface. This is the shell that is installed and set by default on Linux systems.

Shell C (csh)

Compatible with the user. It is very powerful support for the programmer C and with automatic completion of the command line.

Shell Korn

This is a great shell, it combines the superiority of sh and csh.

zsh

This is the most powerful shell in recent times. It supports a lot of powerful features, but the installation is very simple.

Conclusion

I know that this article only presents a simple and brief shell script. What I want to convey here is the first look at the shell, what it is and what it does. Once you have grasped its position in the system and are familiar with it, you will not be hard to understand more about it.

Continue reading the seriesNext part: What is bash script? »»
If you liked this article, then please subscribe to our YouTube Channel for more video tutorials. You can also find us on Twitter and Facebook.


Share this post to your friends !
If you appreciate what we share in this blog, you can support us by:
  1. Stay connected to: Facebook | Twitter | Google Plus | YouTube
  2. Subscribe email to recieve new posts from us: Sign up now.
  3. Start your own blog with SSD VPS - Free Let's Encrypt SSL ($2.5/month).
  4. Become a Supporter - Make a contribution via PayPal.
  5. Support us by purchasing Ribbon Lite Child theme being using on this website.

We are thankful for your support.

single post bottom banner
«« »»

Got something to say? Join the discussion

Please keep in mind that all comments are subject to our Comment Policy. Your email address will not be published.
This site uses Akismet to reduce spam. Learn how your comment data is processed.