I am trying to match all characters of given string but those characters should match in the order as given to the bash script.
while [[ $# -gt 0 ]]; do case $
You may use getopts with some bash parameter substitution to construct the query string.
getopts
#!/bin/bash while getopts 'i:' choice do case "${choice}" in i) length=${#OPTARG} for((count=0;count
Refer this to know more on parameter substitution and this for getopts.
parameter substitution