For loops can save time and help you with automation for tiny tasks. for each line that is a line in str, statements from do till done are executed, and line could be accessed within the for loop for respective iteration. In tcsh, both foreach and end must appear alone on separate lines, so you cannot create a for loop on one line as you can with Bash and similar shells. However, the reverse is not true; you cannot arbitrarily replace newlines with semicolons. The bash $(