Cshell if clause indentation

I would like to know if indentation is relevant for Cshell scripts.
I wrote my code like this:

if ((-e file1) && (-e file2)) then

cat file1 > file10
cat file2 > file20

endif

Usually I write my if clauses like this:

if ((-e file1) && (-e file2)) then
        cat file1 > file10
        cat file2 > file20
 endif

I have tested this script now and it seems that it works without indentation. However, I would like to ask to be sure that it is like that in any way regardless of the computer system or something else because I have processed a lot of large data on different computers with an unindented script and there is no way for me to go back and see if the if clause was evaluated.

Correct, indentation makes it readable but doesn't alter the logical flow.

1 Like