Skip to content

Bash resources

Jana Wold edited this page Aug 31, 2022 · 6 revisions

The Command Line: An efficient way to use a computer

For most day-to-day applications we use a graphic user interface (GUI) to ineract with software and complete tasks on a computer. However, the command line interface (CLI) offers an efficient means to perform and automate tasks. For example, say you wanted to rename 20 files sharing a similar naming syntax in a directory. If you had to rename each one using the GUI this task would be time intensive and potentially frustrating. In contrast, using the CLI would make renaming these files efficient in a single line of code.

Another important reason to invest in learning the CLI is that many bioinformatic programmes can only be used in the command line. Although the initial stages of memorising specific commands and their syntax may be dauting, it is an essential skill on your journey to analysing genomic data.

Resources

It can be a bit daunting to remember when you may want to ls -lh or pwd or even remembering the difference between for; do; done and if; then; fi loops. Cheatsheets like this prepared by devhints blog owner @rstacruz, or this one prepared by git master Muhammed Rahed Saeed are useful!

For a general introduction to bash in the context of bioinformatics, check out this Data Carpentry course. Originally hosted by NeSI and Genomics Aotearoa at the University of Canterbury, it covers everything from navigating directories to whole-genome alignment!

Once you've mastered the basics, this fantastic resource also prepared by NeSI and Genomics Aotearoa is great for refining intermediate to advanced level skills!