Unix and Perl Primer for Biologists by Keith Bradnam & Ian Korf is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License. Please send feedback, questions, money, or abuse tokeith.bradnam@icr.ac.uk or ifkorf@ucdavis.ed
Thanks for the author’s great work that I luckily have an opportunity to learning the great materials.
This course is designed for Biologists who want to learn how to program but never got around to it. Programming, more than just about any other skill, comes in waves of understanding.As you are learning, if you are getting confused and discouraged, slow down and ask questions.
Why Unix
It may seem archaic to use a keyboard to issue commands today, but it’s much easier to automate keyboard tasks than mouse tasks.The real strength of learning Unix is that most of these commands can be combined in an almost unlimited fashion.
Why Perl
Perl is one of the most popular Unix programming languages. It is generally easier to learn programming in a scripting language because you don’t have to worry as much about variable types and memory allocation. The downside is the interpreted programs often run much slower than compiled ones (100-fold is common). Scripts are programs, scripting is programming, and computers can solve problems quickly regardless of the language.
Typeset Conventions
All of the Unix and Perl code in these guides is written in constant-width font with line numbering. Sometimes a paragraph will include a reference to a Unix command, Perl function, or a file that you should be working with, Any such text will be in a constant-width, boxed font. For example,Type the pwd
command again
Preamble
What computers can run perl
As a programming language, Perl is platform agnostic.
What computers can run the Unix?
achieve a Unix-like environment on your Windows PC in one of two ways:
- Install Cygwin(http://www.cygwin.com/) — this provides a Linux-like environment on your PC. There are some differences between Cygwin and other types of Unix which may mean that not every Unix example in this course works exactly as described.
- Install Linux by using virtualization software — there are many pieces of software that will now allow you effectively install one operating system within another operating system. Microsoft has it’s own (free) Virtual PC software(https://www.microsoft.com/en-us/download/details.aspx?id=3702), and here are some guidelines for using Ubuntu Linux with various virtualization software tools(http://www.pcreview.co.uk/articles/Windows/Run_Linux_in_Windows/).
There is a lot of variation within the world of Unix/Linux. Most commands will be the same, but the layout of the file system may look a little different.
Do I need to run this course from a USB drive?
Instructions in this document will assume that you are working on a flash drive on a Mac computer, so many of the Unix examples will not work exactly as written on other systems. In most cases you will just need to change the name of any directories the are used in the examples.