generated from mpievolbio-scicomp/2023-04-04-MPIEvolBio
-
Notifications
You must be signed in to change notification settings - Fork 1
01 introduction_notes
Carsten Fortmann-Grote edited this page Mar 17, 2024
·
5 revisions
- Download shell-lesson-data.zip and move the file to your Desktop.
- Unzip/extract the file. Let your instructor know if you need help with this step. You should end up with a new folder called shell-lesson-data on your Desktop.
- What is a command shell and why would I use one?
- Explain how the shell relates to the keyboard, the screen, the operating
system, and users’ programs.
- Explain when and why command-line interfaces should be used instead of
graphical interfaces.
- copy line 1521 from all files in 200 directories into a new file
- estimate how much time this would take you with a GUI word processor
- We will see that the shell accomplishes this task in seconds
- repetitive tasks
- do stuff on a remote computer (e.g. compute cluster)
- combine tools into pipelines
- automate tasks
- keep work reproducible
- Reduces risk for repetitive strain injury
- doing stuff that needs visual interaction
- visualization (although there are ways…)
- start from scratch (you gotta know the basics)
- open your shell
- Windows: Start->git bash
- Mac: Terminal
- Linux: |CTRL-ALT-T| or |ALT-F2| “gnome-terminal”
- “>” or “$” or combinations of these plus hostname, username, current directory, …
- do not type the prompt when entering commands
$ ls |Enter|
- what happens?
$ ks |Enter|
- what happens?
- A shell is a program whose primary purpose is to read commands and run other programs.
- This lesson uses Bash, the default shell in many implementations of Unix.
- Programs can be run in Bash by entering commands at the command-line prompt.
- The shell’s main advantages are its high action-to-keystroke ratio, its support for automating repetitive tasks, and its capacity to access networked machines.
- A significant challenge when using the shell can be knowing what commands need to be run and how to run them.