I have a bash statement to test a command line argument. If the argument passed to the script is clean, then the script removes all .o files. Otherwise, it builds a program. However, not matter what is passed (if anything), the script still thinks that the argument clean is being passed.#!/bin/bashif test `whoami` != root ; then    echo You must be logged in as root to build (for loopback mounting)    echo Enter 'su' or 'sudo bash' to switch to root    exitfiARG=$1if [ $ARG==clean ] ; then    echo >>> cleaning up object files...    rm -r src/*.o    echo >>> done.     echo >>> Press enter to continue...    readelse    #Builds programfi
Bash if statement not working properly
bash;shell;shell script;arguments
You need to separate the arguments to [ with spaces; also, the equality operator is a single =, and you should quote both sides:if [ $ARG = clean ]; then