How to come back in for loop?I'm try to check if condition inside if. if condition is satisfied it goes to if condition.
a=(1 2 3 4 5 6 7 8 9)
file="/data/dev-staging/Scripts.txt"
dir="/data/test"
for i in ${a[@]} do
if [ $i = 5 ]; then
if [ -f "$file" ]; then
mv $file $dir
continue
fi
else
fi
done
note:- Once the file enter into if condition**(if [ -f "$file" ]; then)** then I want to come back for loop.
suppose I will use continue it goes to first if condition(if [ $i = 5 ]; then).