Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Range of number from 0.1 to 10.0

$
0
0
Is there a way to create a loop that will output number starting from 0.1 to 10.0
0.1
0.2
0.3
0.4
0.5
..
...
10.0

This is what i tried.
Code:

for i in {1..50}; do    printf -v i '%02d' $i ;    echo "$i"; done
That will print
01
02
03
..
..
50

How do i add a period in between the two numbers?

Viewing all articles
Browse latest Browse all 16232

Trending Articles