0

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
4
  • Seems like a little more code would be helpful. You might want to look into xargs based on the question title, but it's very hard to understand your question otherwise. Commented Jun 8, 2012 at 18:12
  • I guess I misunderstood the question (which was hard to understand). If you had simply listed the error message, it would've been easy to see the error pointed out by @WilliamPursell Commented Jun 8, 2012 at 18:53
  • Take a look at the select builtin command. It comes in handy for creating menus. Also of interest may be the external utilities dialog or whiptail. Commented Jun 8, 2012 at 20:12
  • Sorry my question was hard to understand. As previously stated, I am new to this and have ZERO formal training. BTW, the error literally said, "Too many arguments", which was stated in my question. Thanks to William for trying with little code to work with. Commented Jun 11, 2012 at 14:15

1 Answer 1

5

Replace ! = with != with no intervening space.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.