I am new to shell scripting. I tried the below code for first checking whether any XML files exists in the specified directory. If one is found then I need to store the XML files in to the array to process the data. But the below lines are not working. What am I doing wrong? Please suggest the correct approach.
if [ -f ${Input_Path}/ABC/*.XML ]
then
arr=(${Input_Path}/ABC/*.XML)
for i in "${arr[@]}";
do
.......
done