Spark's Work

A Quick Tutorial on Bash Scripts

Whenever I run large computing jobs on a remote server, it typically takes some thoughts and tricks to get things done in the most convenient and reproducible way. For me, it involves using the DrWatson.jl package (see here) and leveraging command line arguments as opposed to hard-coding (see here).

Another indispensable tool when interacting with linux servers is the Bash shell. In particular, Bash scripts, if properly written, can be extremely useful for automating repetitive tasks, and for making the code more reproducible (e.g. no need to manually input the same command line arguments every time, keeping a record of all the command line arguments used, etc).

I have found an online tutorial for Bash scripting, see here. It is super user-friendly and provides an excellent introduction to Bash. I finished it in a day: now I am able to write simple Bash scripts to further facilitate my research workflow!