incrementing variables

Guy Harris guy at auspex.auspex.com
Fri Mar 30 06:04:34 AEST 1990


>A couple of weeks ago someone asked how to increment a variable in Bsh and
>in response to that it was mentioned that writting a C program to do it
>would be much quicker.

I presume they meant that doing the whole loop in C would be faster;
it's not particularly surprising that your program isn't faster, since a
lot of the time in both examples is spent firing up "exec" or your
program, and only a small amount of time is spent in the "expr" example
parsing the expression, etc..



More information about the Comp.unix.questions mailing list