Bash, I think (sorry, I am still relatively new to the Linux world, so I am not sure).
I forgot Linux has the option to run under different shells; maybe the most portable option in this situation would be just
IIRC, it is a sh script: bash prefer the use of double '[' so it would have been
if [[ -w $static_output ]]; then rm -f $static_output; fi
Also, to write "cleaner" code (I think bash is shell compatible, but shell is not bash compatible... need to check. Anyway, I do not know if csh or zsh have compatibility with other shells so...), you could think about using the command test instead of it's shortcut ( "[...]" ) and to finish, use the && operator:
test -w $static_output && rm -f $static_output
This results in, at least, faster code ("&&" is faster than "if" said a teacher of mine, and result as an "if" because if first expression is false, the second is not evaluated, like in C and C++. Anyway, I do not really think that it is important here) and as && is probably also in csh (C-shell, so I guess our usual operators works there too
)
maybe a more UNIX portable code too.
About the test, I am not sure it is really useful: "man rm" said this for the "-f" option: "Do not prompt for confirmation. Do not write diagnostic messages or modify the exit status in the case of nonexistent operands. Any previous occurrences of the -i option shall be ignored." so if the use of the test is simply to verify that you can delete... just delete, effect will be identical.
But I would not say everything I said is certain: I am still considering myself as a child with linux scripting.