This page lists the concepts related to bash/shell scripts.

Reading Input from command line into a variable

read var # this accepts input from the comman line and stores in variable "var"

Declaring a Variable

var="abcd" # creates a variable var with value "abcd" in the script

Source vs Execute

scripts.png

Default Variables Available in Scripts

script_arguments.png

Storing output of a command in a variable

var=$(command) # this stores the output of the command in the variable var

Timing a script