[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

too generic?



i am getting an error from a bash script that returns:

./search_guest.sh: [: too many arguments


the script executes properly, and returns the correct output however, it
give me this error.

snippet of the script:

                        while read SEARCH2; do
                                FNAME=`echo $SEARCH2 | cut -d^ -f2`
                                LNAME=`echo $SEARCH2 | cut -d^ -f3`
                                ADDR=`echo $SEARCH2 | cut -d^ -f4`
                                CITY=`echo $SEARCH2 | cut -d^ -f5`
                                ST=`echo $SEARCH2 | cut -d^ -f6`
                                ZIP=`echo $SEARCH2 | cut -d^ -f7`
                                INV=`echo $SEARCH2 | cut -d^ -f8`
                                ATT=`echo $SEARCH2 | cut -d^ -f9`
                                GIFT=`echo $SEARCH2 | cut -d^ -f10`
                                THANK=`echo $SEARCH2 | cut -d^ -f11`
                                        if [ $FNAME = $FIRSTGUEST ] && [
$LNAME = $LAST ]; then
                                                clear
                                                echo " "
                                                echo "
-----------------------------------------"
                                                echo " "
                                                echo " $FNAME $LNAME"
                                                echo " $ADDR "
                                                echo " $CITY, $ST $ZIP"
                                                echo " "
                                                echo "
-----------------------------------------"
                                                echo " "
                                                echo " Invitation Sent
$INV"
                                                echo " Numbering Attending
$ATT"
                                                echo " "
                                                echo "
-----------------------------------------"
                                                echo " Gift "
                                                echo " $GIFT"
                                                echo " Thank You sent
$THANK"
                                                echo "
-----------------------------------------"
                                        fi
                        done < db.guests

        fi                              
echo " "
echo "<M>ain Menu <S>earch Again"
read DECIDE


the error comes after the while, but before the:

echo "<M>ain Menu <S>earch Again"

-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.