Skip to main content

Command Palette

Search for a command to run...

Shell Scripting Standards

Published
1 min read
Shell  Scripting Standards
S

🖐Hi There! ⫸ Currently working as a System Administrator | WebLogic Admin. ⫸ Aspiring to be DevOps | SRE | Build & Release Engineer ⫸Enthusiast about Technical Writing

Welcome to Scripting Standards

In this Section?

  1. Script Naming Convention.

  2. Script File Permissions.

  3. Shell Script Format.

  4. Sequence of Script Execution

  5. What are Variables and How to Create them?

Script Naming Convention

  1. Scripts directory

  2. Script name should identify function.

Script format

  1. Define Shell (#! /bin/bash)

  2. Comments (# comments)

  3. Define Variables (eg name=Imran)

  4. Commands(echo, cp, grep etc)

  5. Statements(if, while, for etc)

  #!/bin/bash
  # Purpose: Testing script format
  # Date: 22/02/2024
  # Modification: 22/02/2024
  # blank

  a='My Name is Shounak Khulape'
  echo $a

  date
  df -h

    if { $a -eq file }
    then echo this
    else
    echo that
    fi

Script Sequence

  1. command 1

  2. command 2

  3. command 3

  • eq:-

  • ls

  • date

  • cal

That's great if you have make till here you have covered Shell Scripting Standards.

If you liked what you read, do follow and any feedback for further improvement will be highly appreciated!

Thank you and Happy Learning!👏

More from this blog

Shounak Khulape

41 posts