@@ -607,7 +607,7 @@ Here, let us explore powerful tools to manipulate text files. Many of these
607
607
functions are available in Python and R, but here we can show the exact same
608
608
functionality with time-tested tools.
609
609
610
- ** awk
610
+ ** awk - text processing language with strength in tabular data
611
611
612
612
The ~awk~ command line tool is a powerful tool for processing text files,
613
613
especially those organized into rows and columns i.e. tabular data.
@@ -689,8 +689,10 @@ total 113
689
689
- [[https://www.lifewire.com/write-awk-commands-and-scripts-2200573][How to Write AWK Commands and Scripts]]
690
690
- [[https://www.thegeekstuff.com/2010/01/8-powerful-awk-built-in-variables-fs-ofs-rs-ors-nr-nf-filename-fnr/][8 Powerful Awk Built-in Variables (The Geek Stuff)]]
691
691
- [[http://www.grymoire.com/Unix/Awk.html][Awk (Grymoire)]]
692
+ - [[https://ss64.com/bash/awk.html][awk or gawk (GNU awk)]]
693
+ - [[https://github.com/learnbyexample/Command-line-text-processing/blob/master/gnu_awk.md][Learn by Example awk]]
692
694
693
- ** sed
695
+ ** sed - edit streams of text
694
696
695
697
The ~sed~ command is another powerful command. While ~awk~ is useful for
696
698
manipulating tabular data, ~sed~ is used to read in text and transform it.
@@ -707,8 +709,9 @@ A simple use of ~sed~ is for replacing text.
707
709
*** Resources and more
708
710
709
711
- [[http://www.grymoire.com/Unix/Sed.html][sed (Grymoire)]]
712
+ - [[https://ss64.com/bash/sed.html][sed (SS64)]]
710
713
711
- ** cut
714
+ ** cut - divide file into several parts by columns/delimiter
712
715
713
716
The ~cut~ command is useful to divide a file into several parts.
714
717
@@ -737,15 +740,15 @@ total 113
737
740
-rw-r--r--
738
741
:END:
739
742
740
- ** sort
743
+ ** sort - put items in order
741
744
742
745
As the name implies, the ~sort~ command will order a list of items.
743
746
744
747
#+BEGIN_SRC sh
745
748
ls | sort
746
749
#+END_SRC
747
750
748
- ** find
751
+ ** find - search for files
749
752
750
753
The ~find~ command will be helpful to search for files.
751
754
@@ -1093,7 +1096,7 @@ When working with a server, you may want to move files between your own
1093
1096
computer and the server. While there are graphical tools to do this, there are
1094
1097
command line tools available to you to do this as well.
1095
1098
1096
- ** curl and wget
1099
+ ** curl and wget retrieve files from servers
1097
1100
1098
1101
~curl~ and ~wget~ are both command line tools that can download contents from
1099
1102
servers and the internet.
@@ -1133,7 +1136,7 @@ For simple file downloads, there isn't much of a difference in use.
1133
1136
- [[https://www.cyberciti.biz/faq/curl-download-file-example-under-linux-unix/][Linux/Unix: curl Command Download File Example]]
1134
1137
- [[https://www.cyberciti.biz/tips/linux-wget-your-ultimate-command-line-downloader.html][Linux wget: Your Ultimate Command Line Downloader]]
1135
1138
1136
- ** scp and sftp
1139
+ ** scp and sftp for secure transfer of files
1137
1140
1138
1141
~scp~ and ~sftp~ are both useful command line tools to move files between
1139
1142
servers/computers.
@@ -1231,7 +1234,7 @@ Here are some benefits to using a terminal multiplexer:
1231
1234
- Use when network connection unreliable
1232
1235
- Pick up progress quickly on a server when you login
1233
1236
1234
- **** Screen
1237
+ *** Screen
1235
1238
1236
1239
Initially releases in 1987, Screen is a mature and stable terminal
1237
1240
multiplexer.
@@ -1267,7 +1270,7 @@ is a list of commands to use while in screen.
1267
1270
| Ctrl+a " | Switch between terminals using list |
1268
1271
| Ctrl+a ? | Display list of all commands |
1269
1272
1270
- **** tmux
1273
+ *** tmux
1271
1274
1272
1275
Initially created in 2007, tmux is also a terminal multiplexer with very
1273
1276
similar features compared to Screen.
@@ -1317,7 +1320,7 @@ The main key to invoke changes in tmux is ~Ctrl+b~.
1317
1320
- More
1318
1321
- [[https://leanpub.com/the-tao-of-tmux/read][The Tao of tmux - Leanpub]]
1319
1322
1320
- ** GNU Make
1323
+ ** GNU Make for automation
1321
1324
1322
1325
In programming, we want to no repeat ourselves. So people made GNU ~make~ as an
1323
1326
automation (build) tool.
@@ -1455,7 +1458,7 @@ The data can be found [[https://archive.ics.uci.edu/ml/machine-learning-database
1455
1458
1456
1459
** Exercise 3 Search for Codons
1457
1460
1458
- Using the random DNA seqence Python script from Exercise 1, generate a random
1461
+ Using the random DNA sequence Python script from Exercise 1, generate a random
1459
1462
sequence of DNA and count the number of times the DNA sequence "TAA" (a stop
1460
1463
codon).
1461
1464
@@ -1464,10 +1467,25 @@ count them each.
1464
1467
1465
1468
* Resources and More
1466
1469
1470
+ - [[https://github.com/learnbyexample/Linux_command_line][Linux Commands and Shell Scripting - learnbyexample]]: overview of Linux and
1471
+ commonly found commands
1472
+ - [[https://github.com/learnbyexample/Command-line-text-processing][Command Line Text Processing - learnbyexample]]: from finding text to search
1473
+ and replace, from sorting to beautifying text and more
1474
+ - [[http://tldp.org/LDP/abs/html/][Advanced Bash Scripting Guide]]: an in-depth exploration of the art of shell
1475
+ scripting
1476
+ - [[https://github.com/stephenturner/oneliners][Bioinformatics One-Liners by Stephen Turner]]: useful bash one-liners usesful
1477
+ for bioinformatics
1478
+ - [[https://github.com/jlevy/the-art-of-command-line][The Art of Command Line]]: guide for both beginners and the experienced, with
1479
+ goals of **breadth** (everything important), **specificity** (give concrete
1480
+ examples of the most common case), and **brevity** (avoid things that aren't
1481
+ essential or digressions you can easily look up elsewhere
1482
+ - [[https://github.com/denysdovhan/bash-handbook][bash-handbook (GitHub)]]: document for those who want to learn Bash without
1483
+ diving in too deeply.
1484
+ - [[https://github.com/awesome-lists/awesome-bash][Awesome Bash (GitHub)]]: a curated list of delightful Bash scripts and
1485
+ resources
1486
+ - [[https://twitter.com/i/moments/1026078161115729920][Julia Evans' (@b0rk) Twitter snippets]]: scroll through her photos for hand
1487
+ drawn descriptions of bash and others
1467
1488
- [[http://tldp.org/LDP/Bash-Beginners-Guide/html/index.html][Bash Guide for Beginners]] (Beginner)
1468
1489
- [[http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html][BASH Programming - Introduction HOW-TO]] (Intermediate)
1469
- - [[https://github.com/stephenturner/oneliners][Bioinformatics One-Liners by Stephen Turner]]
1470
1490
- [[http://mywiki.wooledge.org/BashPitfalls][Bash Pitfalls - Common Errors Bash Programmers Make]]
1471
- - [[https://github.com/denysdovhan/bash-handbook][bash-handbook (GitHub)]]
1472
1491
- [[https://sanctum.geek.nz/arabesque/series/unix-as-ide/][Unix as IDE Series]]
1473
- - [[https://github.com/awesome-lists/awesome-bash][Awesome Bash (GitHub)]]
0 commit comments