Skip to main content

Shell Scripting

Updated 2 min readMarkdown
Shell Scripting

Shell Scripting is a command line Interpreter (CLI). It's nothing but the list of the commands executed by the shell.

What is the difference between Shell Scripting and Programming?

Shell scripting refers to the writing of a script that is interpreted by the shell. Shell scripts are usually used to automate the task and are typically written in bash.

On the other hand, Programming is used to write code that is compiled and interpreted by programming language.

The key differences between shell scripting and programming languages are that shell scripting is used for automating the task whereas programming is used to build the applications.

  • What is #!/bin/bash? can we write #!/bin/sh as well?

#!bin/bash is also known as shebang or hashbang line in the shell script. It is used to specify to use of the shell script or interpreter that should be used to execute the script. In this case, #!/bin/bash that the specified bash to be used.

Yes, we can use #!/bin/sh in our shell script should be executed by the default shell on the system.

  • Write a Shell Script that prints I will complete #90DaysOofDevOps challenge

Write a Shell Script to take user input, input from arguments and print the variables.

Output:-

  • Write an Example of If else in Shell Scripting by comparing 2 numbers

Output

Thanks for Reading

Happy Learning💫

No comments yet. Be the first to comment.

More from this blog