This is what i have done to perform this function but I am not getting what i want.

```
#!/bin/sh
DIRECTIONPART1=4-7-9 

for (( i=1; i<=3; i++ )) 
do 
x=`echo $DIRECTIONPART1| awk -F'-' '{print $i}'` 
myarray[$i]=$x 

done

for (( c=1; c<=3; c++ )) 
do 
echo ${myarray[$c]} 
done

```

Problem we realised at this step 

```
x=`echo $DIRECTIONPART1| awk -F'-' '{print $i}'` 

```

Please help me in getting the result

This is what i get :

```
4-7-9 
4-7-9
4-7-9

```

But I want this:
4
7
9