-
Notifications
You must be signed in to change notification settings - Fork 4
Short 3
Andrea Telatin edited this page Dec 4, 2019
·
3 revisions
With program pipes we can make use of the Linux programming philosophy: each program performs a small task and they can be chained using the |
(pipe) operator. The first program output is used as input for the second program and so and forth.
Example: the output of cat is fed into wc that will print the number of lines of the file:
cat ~/learn_bash/phage/vir_genomic.gff | wc -l
Or we can count the number of sequences in a FASTA file:
grep '>' ~/learn_bash/phage/vir_protein.faa | wc -l
We can save the output of a program into a text file using the >
redirection operator:
grep '>' ~/learn_bash/phage/vir_protein.faa > ~/course/vir_headers.txt
- See more: Inspecting text files (if you didn't before)
- See more: Running a bioinformatics program
· Bioinformatics at the Command Line - Andrea Telatin, 2017-2020
Menu