Skip to main content

Command Palette

Search for a command to run...

Day4: Basic Linux Shell Scripting for DevOps Engineers.

Updated
1 min readView as Markdown
Day4: Basic Linux Shell Scripting for DevOps Engineers.

Day4: 90 days of DevOps -

  1. What is Shell Scripting?

    Shell scripting is a computer program or a file which have commands in sequential order in order to execute particular tasks.

    The script is interpreted by a shell which can be a bash, zsh, sh, or Korn shell. A shell is a command line interpreter which is an interface to provide interaction between the user and the kernel.

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

    #!/bin/bash is also known as shebang. It is written in order to understand by the command line interpreter that the given script is set for bash.

    While we can write #!/bin/sh as well, and bash(bourne again shell) is sh just with better syntax and more features.

  3. Write a Shell Script that prints I will complete #90DaysofDevOps challenge.

    #!/bin/bash

    echo I will complete the #90DaysofDevOps challenge.

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

    #!/bin/bash

    echo What is your name?

    read name

    echo My name is $name.

  5. Write an example of If else in Shell Scripting by comparing 2 numbers.

More from this blog

Untitled Publication

28 posts