("A" 2)
Addition
1+2
Unary positive, makes number positive
+2
Subtraction
2-1
Unary negative, makes number negative
-2
Multiplication
2*3
Division
4/2
Modulo (remainder of division)
4%2
Indice
4**2
Increment
Decrement
Equals (no space between variable and value)
x=2
Is equal to
Is not equal to
Greater than
Less than
Greater than or equal to
Less than or equal to
Returns true if string is null
Returns true if string is not null
Is equal to
Is not equal to
Greater than (ASCII order)
Less than (ASCII order)
Greater than or equal to (ASCII order)
Less than or equal to (ASCII order)
Returns true if string is null
Returns true if string is not null
Bitwise AND
Bitwise OR
Bitwise XOR
Arithmetic shift left (shifts all the bits one space to the left, essentially multiplying it by 2)
Logical shift right (shifts all the bits one space to the right, essentially dividing it by 2)
Bitwise NOT
AND operator
OR operator
NOT operator
Checks if file is block special file
Checks if file is character special file
Checks if directory exists
Checks if file exists
Checks if file has read permission
Checks if file has write permission
Checks if file has execution permission
Checks if file has size greater than 0
References a array's index
Defines conditions of a block
Single character wildcard; for the characters contained within the brackets
Single character wildcard; for the characters not contained within the brackets
Initialises an array
Defines conditions of a block
Used for defining functions
Pipeline; makes output of left command the input for the right
OR logic (grep extended)
Defines a mathematical expression
Shebang; declares script as executable, followed by path to be executed in
#!/bin/bash
Represents home directory
Represents a directory
Represents parent directory
Represents numbers between two integers
Represents current directory
Single character wildcard
Redirects command output to file
Redirects stream
Appends an output to a file
Execute second command if first command has no error
Redirects command error output to file
Redirects command output to command error output
Redirects command error output to command output
Single character wildcard; represents a single character
Zero or single character wildcard (grep extended)
Multiple character wildcard; represents zero or more characters
Represents variable array index in loops
Represents variable array index in loops
Array variable operator
Returns index of an object in an array in loops
Represents previous command
Variable operator
End of line (grep)
Single or multiple character wildcard
Start of line (grep)
Declares a string
Declares a string
Declares a command output as a string
Returns amount of parameters listed on execution
Returns the parameters as one string
Returns the return result of last command
Returns the nth parameters
Returns the parameters as one string
Returns the file name of current script
Returns the OS type
Returns the current path
Returns the Process ID of the bash instance
Returns a random unsigned 16 bit integer
Executes code on true condition
Executes code on different cases
case variable in
case1) code;;
case2) code;;
case3) code;;
esac
Executes code for every object in list
for foo in ~/directory;
do
code
done
Loops code on true condition
while [ condition ]
do
code
done
while ( condition )
do
code
done
Loops code on false condition
until [ condition ]
do
code
done
until ( condition )
do
code
done
Defines a function
function name {
code
}
Defines parameter array of a function
Param name
Downloads a file from web-client
Uploads a file to web-client
Downloads a file from web-client instance as a string in memory
Writes bytes to a file
Downloads a file from web-client instance
Converts a string into a Base64 string
IEX; executes a string as a cmdlet or command
Fetches a file
Calculates the hash of a file according to some hashing algorithm
Specifies an algorithm to use
Sends a GET request and catches response
Returns count of different character objects for a given input
Returns the amount of words in an input
Returns the amount of characters in an input
Returns the amount of lines in an input
Returns the amount of bytes in an input
Used to tell compiler this line in the file is not to be compiled