#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2006
    Posts
    3
    Rep Power
    0

    Manipulating counter var in for loop


    how can you use your for loop counter in the body? For example, I want to multiply my counter, say i, by 10 but I get "specified substitution is not valid". What it does allow me to do is add 1 to it. Here's my statement:
    j=${i*10}.

    thanks,
    Rick
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    San Francisco Bay
    Posts
    1,939
    Rep Power
    1313
    Language?

    Just a hunch, but I think you mean "$j = $i*10".
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2006
    Posts
    3
    Rep Power
    0
    this is a unix ksh script so the $j is not the right syntax.

IMN logo majestic logo threadwatch logo seochat tools logo