[CentOS] variable in loop
John Doe
jdmls at yahoo.comMon Jan 3 11:04:43 UTC 2011
- Previous message: [CentOS] variable in loop
- Next message: [CentOS] drivers
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: S Mathias <smathias1972 at yahoo.com> > $ ASDF=hello; a=0; a=$(( 70 - $(echo $ASDF | awk '{print length}') )); echo "$a >$ASDF"$(for i in {1..$a}; do printf "."; done) > 65 hello. > Why doesn't it print: > 65 hello................................................................. > What am i missing? $ for i in {1..3}; do echo $i; done 1 2 3 $ a=3; for i in {1..$a}; do echo $i; done {1..3} Try with: for ((i=1;i<=$a;i++)) JD
- Previous message: [CentOS] variable in loop
- Next message: [CentOS] drivers
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list