I tried to find a workaround for defining lists of consecutive numbers in tcsh, i.e. instead of doing:
i = ( 1 2 3 4 5 6 8 9 10 )
I would like to do something like this (knowing that this does not work)
i = ( 1..10 )
This would be especially useful in foreach loops (I know what I can use just trying to find an alternative).
Looking around, I found this:
foreach $number (`seq 1 1 9`)
...
end
Discovered that here . It is said that it will generate a list of numbers starting with 1, with a step of 1 ending with 9.
I tried, but it did not work. Obviously, seq is not a command. Does it exist or is it just wrong?
Any other ideas?
source
share