[Solved] Problem is “too many arguments”

Musa Okan Kurtkaya Asks: Problem is “too many arguments”
First of all, I will leave the code I wrote below, but I would like to tell you a problem I had before.

Problem 1 : I get the error “too many arguments” when I type any character and leave a space and then type a character again. How can I fix this?” For Example; “Write Anything: ” ab cd This Place is faulty.

Problem 2 : “How can I print the letters corresponding to the text I have written side by side.”

Thanks in advance to anyone who can help me with this.

Code:
write_exs_from_user() {
    read -p "Write Anything: " str
    for (( i = 0; i < ${#str}; ++i ));
    do
        if [ ${str:$i:1} = "a" -o ${str:$i:1} = "A" ]
        then
            echo "
    *
   * *
  * * *
 *     *
*       *
"
        elif [ ${str:$i:1} = "b" -o ${str:$i:1} = "B" ]
        then
            echo "
* * * *
*      *
* * * *
*      *
* * * * 
"
        elif [ ${str:$i:1} = "c" -o ${str:$i:1} = "C" ]
        then
            echo "
* * * * *
*      
* 
*      
* * * * * 
"
        elif [ ${str:$i:1} = "d" -o ${str:$i:1} = "D" ]
        then
            echo "
* * * *
*      *
*       *
*      *
* * * * 
"
        elif [ ${str:$i:1} = "e" -o ${str:$i:1} = "E" ]
        then
            echo "
* * * * *
*      
* * * * *
*      
* * * * * 
"
        elif [ ${str:$i:1} = "f" -o ${str:$i:1} = "F" ]
        then
            echo "
* * * * *
*      
* * * * *
*      
* 
"
        elif [ ${str:$i:1} = "g" -o ${str:$i:1} = "G" ]
        then
            echo "  
 * * * *          
*       *
*
*   * * *
*        *
* * * * *
"
        elif [ ${str:$i:1} = "h" -o ${str:$i:1} = "H" ]
        then
            echo "
*     *
*     *
* * * *
*     *
*     *
"
        elif [ ${str:$i:1} = "i" -o ${str:$i:1} = "I" ]
        then
            echo "
 *
* *
 *

* *
* *
* *
* *
"
        elif [ ${str:$i:1} = "j" -o ${str:$i:1} = "J" ]
        then
            echo "
        *
        *
        *
        *
  *     *
   * * *  
"
        elif [ ${str:$i:1} = "k" -o ${str:$i:1} = "K" ]
        then
            echo "
*     *
*   *
* *
*   *
*     *
"
        elif [ ${str:$i:1} = "l" -o ${str:$i:1} = "L" ]
        then
            echo "
*       
*       
*
*   
*        
* * * * *
"
        elif [ ${str:$i:1} = "m" -o ${str:$i:1} = "M" ]
        then
            echo "
    *     *
   * *   * *
  *   * *   *
 *     *     *
*             *
"
        elif [ ${str:$i:1} = "n" -o ${str:$i:1} = "N" ]
        then
            echo "
    *       *
   * *     * 
  *   *   *   
 *     * *    
*       *      
"
        elif [ ${str:$i:1} = "o" -o ${str:$i:1} = "O" ]
        then
            echo "
   * * *
 *       *
*         *
*         *
*         *
*         *
 *       *
   * * * 
"
        elif [ ${str:$i:1} = "p" -o ${str:$i:1} = "P" ]
        then
            echo "
* * * * *
*        *
* * * * *
*
*
"
        elif [ ${str:$i:1} = "q" -o ${str:$i:1} = "Q" ]
        then
            echo "
   * * *
 *       *
*         *
*         *
*         *
*       * *
 *       *
   * * *  **
"
        elif [ ${str:$i:1} = "r" -o ${str:$i:1} = "R" ]
        then
            echo "
* * * *
*      *
*     *
* ** * 
*     *
*      *
*       *
"  
        elif [ ${str:$i:1} = "s" -o ${str:$i:1} = "S" ]
        then
            echo "
 * * * * 
*       *
*
* * * *
       *
*      *
 * * * 
"
        elif [ ${str:$i:1} = "t" -o ${str:$i:1} = "T" ]
        then
            echo "
* * * * *
    *
    *
    *
    *
"
        elif [ ${str:$i:1} = "u" -o ${str:$i:1} = "U" ]
        then
            echo "
*       *
*       *
*       *
*       *
* * * * *
"
        elif [ ${str:$i:1} = "V" -o ${str:$i:1} = "v" ]
        then
            echo "
*       *
 *     *
  *   *
   * *
    *
"
        elif [ ${str:$i:1} = "w" -o ${str:$i:1} = "W" ]
        then
            echo "
*           *
 *         *
  *   *   *
   * * * *
    *   *
"
       elif [ ${str:$i:1} = "x" -o ${str:$i:1} = "X" ]
        then
            echo "
*   *
 * *
  *
 * *
*   *
" 
elif [ ${str:$i:1} = "y" -o ${str:$i:1} = "Y" ]
        then
            echo "
*     *
*     *
* * * *
      *
* * * *
"
        elif [ ${str:$i:1} = "z" -o ${str:$i:1} = "Z" ]
        then
            echo "
* * * * *
       *
      *
     *
    *
   * * * * *
"
        else 
            echo "Please Write String !"
        fi
    done
}

write_exs_from_user

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.