I have a Cshell script that I modify to have associated input and output locations. functionality all happens in a foreach loop, for example:
set INPUT_LOCATION_LIST = "loc1 loc2 loc3 loc4"
foreach location ($INPUT_LOCATION_LIST)
end
I would like to have an output list with different values than the input list, but go through it every iteration through the foreach loop. The man for foreach just has
foreach name (wordlist)
as a definition. therefore, it is only one thing. my current idea of dealing with this is that the word list contains both input and output location and then parse it in a script:
set INPUT_LOCATION_LIST = "loc1;out1 loc2;out2 loc3;out3 loc4;out4"
so they are wondering if anyone has a better way to do this.
source
share