shell - Multiple wordlists in csh script foreach loop - Stack Overflow
I don't normally use csh, but your question caught my eye. There's probably a solution with less steps, but this kind of thing worked in my version of csh: foreach location ($INPUT_LOCATION_LIST) set one_word_with_space = ${location:s/;/ /} set loc_out .....