BASH

From RHS Wiki
Jump to navigation Jump to search

BASH Script

Hello World

#!/bin/bash
STR="Hello World"
echo $STR

Variables

Local Variables

#!/bin/bash
HELLO=Hello 
function hello {
        local HELLO=World
        echo $HELLO
}
echo $HELLO
hello
echo $HELLO

Strings

Loops

While

For

Conditional

if

case

User Input

Arrays