My script is
#! /bin/bash v1="hello" v2="world1" subIndex=`expr index "${v1}" "${v2}"` echo $subIndex