# Basic Linux Shell Scripting for DevOps Engineers.

1. ### **What is Shell Scripting for DevOps?**
    
    Shell scripting refers to writing a script in a text file containing <mark>writing a script</mark> in a text file that contains a <mark>series of commands</mark>, which can be <mark>executed by the shell</mark>. These commands can <mark>automate tasks</mark>.
    
    For Example: Backing up files, Installing software, Cleaning up old files, Monitoring system resources, and Automating repetitive tasks.
    
2. ### What is `#!/bin/bash?` can we write `#!/bin/sh` as well?
    
    The #!/bin/bash is the starting line for our script, which serves as an instruction to the system on which shell to use to execute the script. In this case, the #!/bin/bash shebang indicates that the Bash shell should be used to run the script.
    
    Yes, we can also use #!/bin/sh in our shell script. It is another type of shell that can be used in a shell script. However, it is worth noting that Bash has more features and capabilities than the Bourne shell.
    
3. ### Write a Shell Script which prints I will complete #90DaysOofDevOps challenge.
    
    ```plaintext
    #!bin/bash
    #This script uses the echo command to print the string.
    echo "#90DaysOofDevOps challenge"
    ```
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1681751105415/791dce00-59c7-4c76-9f76-a622c77edbf1.png align="center")
    
4. ### Write a Shell Script to take user input, input from arguments, and print the variables.
    

```plaintext
#!/bin/bash

echo "Let me find your lucky number, Eneter you name"

read name

number=007

echo "Your name is $name, and  You Lucky number would be $number"
```

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

```plaintext
#!/bin/bash
a=3
b=4
if [ $a >= $b ]
than
   echo " a is the greater than b "
else
  echo " b is not equal to a"
fi
#output:  a is greater than b
```
