I have a following code:
function test() {
for ft in "$1"; do
echo $ft
done
}
test 5
I am trying to loop through number 12, therefore I want ft to be 1,2,3,4,5 respectively in each loop. But it is just printing 5. I also tried {1..$1} but result is still same. Please help!