In TCSH :
I'm giving two lists containing different files in it. Then I have to pass those list as an array element and then the loop should execute twice as there are only 2 lists. But in this case loop is executing as much time as those files in both the lists.
set list_one = (one.s two.s three.s) set list_two = (four.s five.s) set arr=($list_one $list_two) foreach i ($arr) cat $i > $output.s end
This is an example of my code, according to me loop should execute only twice(for list_one
and list_two
), but it's executing five times (for one.s two.s three.s four.s five.s
)