$Let us carefully distinguish between the name of a variable and its value. If variable1 is the nameof a variable, then $variable1 is a reference to its value, the data item it contains.bash$ variable1=23bash$ echo variable1variable1bash$ echo
A binary comparison operator compares two variables or quantities. Note that integer and string comparisonuse a different set of operators.1. integer comparison-eq is equal toif [ "$a" -eq "$b" ]-ne is not equal toif [ "$a"
#!/bin/bash# Call this script with at least 10 parameters, for example# ./scriptname 1 2 3 4 5 6 7 8 9 10MINPARAMS=10echoecho "The name of this script is \"$0\"."echo "The name of this script is \"'basename $0'\"."echoif [ -n "$1" ]
The (( )) construct expands and evaluates an arithmetic expression. If the expression evaluates as zero, itreturns an exit status of 1, or "false". A non-zero expression returns an exit status of 0, or "true". This is inmarked contrast to using the
Returns true if...-e file exists-a file exists. This is identical in effect to -e. It has been "deprecated," [34] and its use is discouraged.-f file is a regular file (not a directory or device file)-s