More updates to the shell section
[swc-modular-shell-hearing.git] / 1-Shell / Readme.md
1 # The Shell
2
3 [Back To The Menu](http://github.com/thehackerwithin/UofCSCBC2012/)
4 - [Forward to Python Variables](http://github.com/thehackerwithin/UofCSCBC2012/tree/master/2a-PythonVariables/)
5
6 * * * * *
7
8 **Presented By : Milad Fatenejad**
9
10 **Most of this material came from a presentation by: ??????**
11
12 # What is the shell how do I access the shell?
13
14 The *shell* is a program that presents a command line interface
15 which allows you to control your computer using commands entered
16 with a keyboard instead of controlling graphical user interfaces
17 (GUIs) with a mouse/keyboard combination.
18
19 A *terminal* is a program you run that gives you access to the
20 shell. There are many different terminal programs that vary across
21 operating systems. To open the default terminal in Ubuntu, just
22 click... or just use CTRL+ALT+t
23          
24 There are many reasons to learn about the shell. In my opinion, the
25 most important reasons are that: 
26
27 1.  It is very common to encounter the shell and
28     command-line-interfaces in scientific computing, so you will
29     probably have to learn it eventually 
30
31 2.  The shell is a really powerful way of interacting with your
32     computer. GUIs and the shell are complementary - by knowing both
33     you will greatly expand the range of tasks you can accomplish with
34     your computer. You will also be able to perform many tasks more
35     efficiently.
36
37 The shell is just a program and there are many different shell
38 programs that have been developed. The most common shell (and the one
39 we will use) is called the Bourne-Again SHell (bash). Even if bash is
40 not the default shell, it usually installed on most systems and can be
41 started by typing "bash" in the terminal. Many commands, especially a
42 lot of the basic ones, work across the various shells but many things
43 are different. I recommend sticking with bash and learning it well.
44
45 # The Example: Manipulating Experimental Data Files
46
47 We will spend most of our time learning about the basics of the shell
48 by manipulating some experimental data from a hearing tests. 
49
50 **Cochlear Implants**
51
52 A cochlear implant is a small electronic device that is surgically
53 implanted in the inner ear to give deaf people a sense of
54 hearing. More than a quarter of a million people have them, but there
55 is still no widely-accepted benchmark to measure their effectiveness.
56 In order to establish a baseline for such a benchmark, our supervisor
57 got teenagers with CIs to listen to audio files on their computer and
58 report:
59
60 1.  the quietest sound they could hear
61 2.  the lowest and highest tones they could hear
62 3.  the narrowest range of frequencies they could discriminate
63
64 To participate, subjects attended our laboratory and one of our lab
65 techs played an audio sample, and recorded their data - when they
66 first heard the sound, or first heard a difference in the sound.  Each
67 set of test results were written out to a text file, one set per file.
68 Each participant has a unique subject ID, and a made-up subject name.
69 Each experiment has a unique experiment ID. The experiment has
70 collected 351 files so far.
71
72 The data is a bit of a mess! There are inconsistent file names, there
73 are extraneous "NOTES" files that we'd like to get rid of, and the
74 data is spread across many directories. We are going to use shell
75 commands to get this data into shape. By the end we would like to:
76
77 1.  Put all of the data into one directory called "alldata"
78
79 2.  Have all of the data files in there, and ensure that every file
80     has a ".txt" extension
81
82 3.  Get rid of the extraneous "NOTES" files
83
84 If we can get through this example in the available time, we will move
85 onto more advanced shell topics...
86