For loops in bash

*Note to all users: As of 07/14/2019, all posts have been moved to (and are being updated at crivaldi.github.io . I don’t have plans to shut this site down, but I have no idea how long it will be maintained by the university in the future.*

A collection of really useful links for bash scripting

For loops:

Here are some links to tutorials I’ve compiled so you can get some extra practice using/crafting for loops. All of these will contain information we haven’t covered yet in addition to the basic for loop.

https://jvns.ca/blog/2017/03/26/bash-quirks/

https://astrobiomike.github.io/bash/for_loops

https://ryanstutorials.net/bash-scripting-tutorial/bash-loops.php

http://tldp.org/LDP/abs/html/loops1.html#EX22

Warning about using the output of ‘ls’ as a set for a for loop:

http://mywiki.wooledge.org/ParsingLs

More bash goodies:

http://www.kfirlavi.com/blog/2012/11/14/defensive-bash-programming/

https://google.github.io/styleguide/shell.xml

Test your skills!!

https://cmdchallenge.com/

Environment to test out code if you think something weird might be going on with your setup (warning – there might also be something weird with this setup, I haven’t played with it a whole lot).

https://repl.it/languages

Regex Practice

(Comic: www.xkcd.com/208)

Lots of options for practice – choose your favorite!

https://regexr.com/

https://regexone.com/

http://rubular.com/

Regex combined with sed and awk: https://likegeeks.com/regex-tutorial-linux/?epik=0wDgLEvIWHzZ9

Regex golf – match a string with the shortest possible expression:

https://alf.nu/RegexGolf

Bash scripting cheatsheet: https://devhints.io/bash
Common/userful bash one-liners: http://www.bashoneliners.com/
Friend’s github page with too much awesome information to put it into any other category – spend some time digging around: https://github.com/crazyhottommy/getting-started-with-genomics-tools-and-resources