i am using a variable tmpVar, using variable data i need implement for loop
tmpVar="abc bbc cbc nbc mbc" # valiable having total number of words= 5 so i need to loop 5 times.
tmpVar="abc bbc cbc nbc mbc"
tmpcnt=`echo $tmpVar|wc -w`
for cnt in 1..$tmpcnt
do
t1=`echo $tmpVar|awk -F" " '{print $cnt}'` # this is not working. it should take the value first word in the string then process
echo $t1
#checking if t1 = abc then we are implementing some logic and so on....
-
-
-
-
done