Page cover
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Bash

/bin/bash

## ------------------| Environment Variables
env                    # List all envs
echo $PATH             # List path env
echo $USER             # Current user
echo $HOME             # Current user's home
echo $PWD              # Current workind dir
echo $HISTSIZE         # Number of commnds (in memory/current session)
echo $HISTFILESIZE     # How many commands in ~./history
export ip="0.0.0.0"    # Make ip as global variable

01. Introduction

Shebang

#!/bin/bash

Arrays

array=(hello this is an array 123)
echo ${array[2]}

Arguments

Comparison Operators

  • String Operators

  • Integer Operators

  • File Operators

  • Logical Operators

Arithmetic Operators

Input / Output

  • Inputs

  • Output

02. Flow Control

Loops

  • For Loops

  • While Loops

  • Until Loops

If Else

Case Statements

Functions

  • Parameter Passing

  • Return Values (Return Code)

Last updated