#Day4 #90DaysofDevOps

Shell Scripting is an open-source computer program designed to be run by the Unix/Linux shell. Shell Scripting is a program to write a series of commands for the shell to execute. It can combine lengthy and repetitive sequences of commands into a single and simple script that can be stored and executed anytime which, reduces programming efforts.

Shell scripting in Devops is is used to automate the tasks that used to be done manually conventionally.

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

sh => Bourne Shell sh used to be a shell called bourne shell back in 1977. sh is typically a minimalistic shell that lacks some of the advanced features of Bash.

Bash => Bourne Again Shell Bash is an extended version of the Bourne shell (sh) and provides additional features such as command line editing, improved job control, and enhanced scripting capabilities.

#!/bin/bash specifies that the script should be interpreted by the Bash shell, which is a popular shell used in many Linux distributions.

If you want to use Bash-specific features in your script, you should use #!/bin/bash. However, if your script only uses standard POSIX shell features, you can use #!/bin/sh for improved portability.

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

Shell script

Result

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

Shell Scripts

Result

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

Shell Script

Result