I was just trying to figure out how to write a for loop in bash a few minutes ago. I feel like this stuff should be standard curriculum for ANYONE studying science!
You should most definitely check out https://software-carpentry.org/lessons/ -- it's targeted at non-CS people doing data science and is quite well written. Also, to toot my own horn, I have written a course on this sort of stuff: http://web.mst.edu/~nmjxv3/cs1001/
I had troubles figuring out something else. I have two input files and 4 output files per sequence and 115 of those. So I needed a for loop that takes the name of the sequence (blabla001_1.seq) finds the second part of the pair (blabla002_2.seq) then feeds that into a java command that gives 4 outputs using the names of the files. I am used to writing scripts in R so I didn't know how to do that for bash. At the end I found a script that is supposed to do it, took it apart and understood how it works. 10 minutes ago I got my results :)