Table of Contents |
---|
...
- Macs and Linux have Terminal programs built-in – find it now on your computer
- Windows needs help
- Putty – http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
- simple Terminal and file copy programs
- download either the Putty installer (https://the.earth.li/~sgtatham/putty/latest/w64/putty-64bit-0.70-installer.msi)
- or putty.exe (terminal) and pscp.exe (secure copy client)
- Windows Subsystem for Linux – Windows 10 Professional includes a Ubuntu-like bash shells
- See https://docs.microsoft.com/en-us/windows/wsl/install-win10
- We recommend the Ubuntu Linux distribution, but any Linux distribution will have an SSH client
- Cygwin – http://www.cygwin.com/
- A full Linux environment, including X-windows for running GUI programs remotely
- Complicated to install
- Putty – http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
...
The first line is the she-bang. It Even though the expression is inside a shell comment (denoted by the # character), it tells the shell what program should execute this file – in this case, bash itself – even though the expression is inside a shell comment (denoted by the # character).
Code Block | ||||
---|---|---|---|---|
| ||||
#!/bin/bash |
...
Environment variables are like variables in a programming language like python or perl (in fact bash is a complete programming language). They have a name (like BIWORK above) and a value (the value for BIWORK is the pathname /work/projects/BioITeam). Read more about environemt environment variables here: More on environment variables.
...
Code Block | ||||
---|---|---|---|---|
| ||||
# hit Tab once after typing $BIWORK/ to expand the environment variable ls $BIWORK/ # now hit Tab twice to see the contents of the directory ls /work/projects/BioITeam/ # type "pr" and hit Tab again ls /work/projects/BioITeam/pr # type "co" and hit Tab again ls /work/projects/BioITeam/projects/co # type "Co" and hit Tab again ls /work/projects/BioITeam/projects/courses/Co # your command line should now look like this ls /work/projects/BioITeam/projects/courses/Core_NGS_Tools/ # now type "mmi" and one Tab ls /work/projects/BioITeam/projects/courses/Core_NGS_Tools/mmi # your command line should now look like this ls /work/projects/BioITeam/projects/courses/Core_NGS_Tools/misc/ # now hit Tab once # the shell expands as far as it can unambiguously, # so your command line should look like this ls /work/projects/BioITeam/projects/courses/Core_NGS_Tools/misc/small # now hit Tab twice # You should see 3 filenames, all starting with "small" # type a period (".") then hit Tab twice again # You're narrowing down the choices -- you should see two filenames ls /work/projects/BioITeam/projects/courses/Core_NGS_Tools/misc/small # finally, type "f" then hit Tab again. It should complete to this: ls /work/projects/BioITeam/projects/courses/Core_NGS_Tools/misc/small.fq |
...