added forloop in bash script