Remember those tiny programs that you or your friend used to create and run games back in your high school computer labs? Yes, batch files are what we are talking about, here. If you’ve known batch files, then understand that shell scripting in essence, is a cheap imitation of the same.
What is shell scripting?
Linux programming is all about playing around with the command line. Programs in Linux are written in a nutshell which is termed as a command line. And, command line is what’s termed at shell scripting. Clearly, the more you understand the command line, the more you get to know about what can be done using it.
What can you do with it?
Using shell scripting, you can program commands in chains and then allow the system to execute it as a scripted event, similar to how batch files work. Or, more useful functions
like command substitution for instance, using a date’s output as a file naming scheme. However, scripts aren’t merely invocations of commands. They are in fact, programs in themselves. They can be used directly within an operating system by using the common ‘if/then/else’ statements or ‘for’ loops, etc.
Shell scripting is a powerful language and has potential far beyond the knowledge of most programmers. Hence, it needs to be understood well so as to leverage its inert potential.
Interested in learning more about shell scripting? Our Linux boot camp training can help you gets your thoughts and concepts cleared about shell scripting.