Paul
Paul

Reputation: 43

How do I fix too many arguments error in my bash shell script?

I am trying to create a bash script to easily perform searches in logs that are located in multiple directories. Below is my do-while loop function, which is where the error occurs. If the complete shell script is required to troubleshoot, let me know. The "x" represents private materials.

    main_menu ()
{
TEMP=1
while [ "$TEMP" ! = "0" ]
do
    clear
    echo "###############################################"
    echo
    echo "           xxxxxxxxxx xxx Search              "
    echo
    echo "###############################################"
    echo
    echo " [1.] Search Logs by x/x "
    echo
    echo " [0.] Exit "
    echo
    echo " Select an Option: "
    echo
    read TEMP
        case $TEMP in
        1)
        x_name
        x_or_x
        get_x

Upvotes: 0

Views: 2458

Answers (1)

William Pursell
William Pursell

Reputation: 212356

Replace ! = with != with no intervening space.

Upvotes: 5

Related Questions