I have a simple csh script that has a simple foreach loop that goes over numbers, from 1 to 10:
foreach n(1 2 3 4 5 6 7 8 9 10)
...
end
Now I want to expand the script to work on over a hundred consecutive n values. Obviously, typing all the numbers between 1 to 100 is an unreasonable solution. I think I saw once a way to count with a foreach loop by specifying the range, or something like that. I can't find it now, and when searching forums and google, I can't find a simple solution for that.
Is it possible to make foreach to go over values without explicitly typing them? Specifically, can I use foreach to count from 1 to 100 without entering all the numbers myslef?
Alternatively, I guess I could use a while loop, but at this point I am curious if foreach can do that too.