Skip to content

Commit cfc345e

Browse files
Merge pull request #186 from coding-for-reproducible-research/intro-to-unix-typos
Intro to UNIX typos
2 parents 43b9eb9 + f0ff192 commit cfc345e

File tree

7 files changed

+26
-75
lines changed

7 files changed

+26
-75
lines changed

_static/workshops_network_python_ds.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ <h1></h1>
282282

283283

284284
// parsing and collecting nodes and edges from the python
285-
nodes = new vis.DataSet([{"color": "#FF6347", "id": "Introduction to Version Control with Git and GitHub", "label": "Introduction to Version Control with Git and GitHub", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Version Control with Git and GitHub\nCourse Pre-reqs: Introduction to Unix\nSubsequent Courses: Intermediate Version Control"}, {"color": "#FF6347", "id": "Intermediate Version Control", "label": "Intermediate Version Control", "level": 3, "shape": "dot", "size": 10, "title": "Course Name: Intermediate Version Control\nCourse Pre-reqs: Introduction to Version Control with Git and GitHub\nSubsequent Courses: None"}, {"color": "#FF6347", "id": "Introduction to Unix", "label": "Introduction to Unix", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Unix\nCourse Pre-reqs: None\nSubsequent Courses: Introduction to Version Control with Git and GitHub"}, {"color": "#FF6347", "id": "Introduction to Python", "label": "Introduction to Python", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Python\nCourse Pre-reqs: None\nSubsequent Courses: Python for Data Analysis "}, {"color": "#FF6347", "id": "Python for Data Analysis ", "label": "Python for Data Analysis ", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Python for Data Analysis \nCourse Pre-reqs: Introduction to Python\nSubsequent Courses: None"}]);
285+
nodes = new vis.DataSet([{"color": "#4682B4", "id": "Introduction to Version Control with Git and GitHub", "label": "Introduction to Version Control with Git and GitHub", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Version Control with Git and GitHub\nCourse Pre-reqs: Introduction to Unix\nSubsequent Courses: Intermediate Version Control"}, {"color": "#4682B4", "id": "Intermediate Version Control", "label": "Intermediate Version Control", "level": 3, "shape": "dot", "size": 10, "title": "Course Name: Intermediate Version Control\nCourse Pre-reqs: Introduction to Version Control with Git and GitHub\nSubsequent Courses: None"}, {"color": "#4682B4", "id": "Introduction to Unix", "label": "Introduction to Unix", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Unix\nCourse Pre-reqs: None\nSubsequent Courses: Introduction to Version Control with Git and GitHub"}, {"color": "#4682B4", "id": "Introduction to Python", "label": "Introduction to Python", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Python\nCourse Pre-reqs: None\nSubsequent Courses: Python for Data Analysis "}, {"color": "#4682B4", "id": "Python for Data Analysis ", "label": "Python for Data Analysis ", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Python for Data Analysis \nCourse Pre-reqs: Introduction to Python\nSubsequent Courses: None"}]);
286286
edges = new vis.DataSet([{"arrows": "to", "from": "Introduction to Version Control with Git and GitHub", "to": "Intermediate Version Control", "width": 1}, {"arrows": "to", "from": "Introduction to Unix", "to": "Introduction to Version Control with Git and GitHub", "width": 1}, {"arrows": "to", "from": "Introduction to Python", "to": "Python for Data Analysis ", "width": 1}]);
287287

288288
nodeColors = {};

_static/workshops_network_r_ds.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ <h1></h1>
282282

283283

284284
// parsing and collecting nodes and edges from the python
285-
nodes = new vis.DataSet([{"color": "#4682B4", "id": "Introduction to R", "label": "Introduction to R", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to R\nCourse Pre-reqs: None\nSubsequent Courses: Regression analysis with R, Working With Data In R"}, {"color": "#4682B4", "id": "Regression analysis with R", "label": "Regression analysis with R", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Regression analysis with R\nCourse Pre-reqs: Introduction to R\nSubsequent Courses: Advanced Regression Analysis With R "}, {"color": "#4682B4", "id": "Working With Data In R", "label": "Working With Data In R", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Working With Data In R\nCourse Pre-reqs: Introduction to R\nSubsequent Courses: None"}, {"color": "#4682B4", "id": "Advanced Regression Analysis With R ", "label": "Advanced Regression Analysis With R ", "level": 3, "shape": "dot", "size": 10, "title": "Course Name: Advanced Regression Analysis With R \nCourse Pre-reqs: Regression analysis with R\nSubsequent Courses: None"}, {"color": "#4682B4", "id": "Introduction to Version Control with Git and GitHub", "label": "Introduction to Version Control with Git and GitHub", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Version Control with Git and GitHub\nCourse Pre-reqs: Introduction to Unix\nSubsequent Courses: Intermediate Version Control"}, {"color": "#4682B4", "id": "Intermediate Version Control", "label": "Intermediate Version Control", "level": 3, "shape": "dot", "size": 10, "title": "Course Name: Intermediate Version Control\nCourse Pre-reqs: Introduction to Version Control with Git and GitHub\nSubsequent Courses: None"}, {"color": "#4682B4", "id": "Introduction to Unix", "label": "Introduction to Unix", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Unix\nCourse Pre-reqs: None\nSubsequent Courses: Introduction to Version Control with Git and GitHub"}]);
285+
nodes = new vis.DataSet([{"color": "#FF6347", "id": "Introduction to R", "label": "Introduction to R", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to R\nCourse Pre-reqs: None\nSubsequent Courses: Regression analysis with R, Working With Data In R"}, {"color": "#FF6347", "id": "Regression analysis with R", "label": "Regression analysis with R", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Regression analysis with R\nCourse Pre-reqs: Introduction to R\nSubsequent Courses: Advanced Regression Analysis With R "}, {"color": "#FF6347", "id": "Working With Data In R", "label": "Working With Data In R", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Working With Data In R\nCourse Pre-reqs: Introduction to R\nSubsequent Courses: None"}, {"color": "#FF6347", "id": "Advanced Regression Analysis With R ", "label": "Advanced Regression Analysis With R ", "level": 3, "shape": "dot", "size": 10, "title": "Course Name: Advanced Regression Analysis With R \nCourse Pre-reqs: Regression analysis with R\nSubsequent Courses: None"}, {"color": "#FF6347", "id": "Introduction to Version Control with Git and GitHub", "label": "Introduction to Version Control with Git and GitHub", "level": 2, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Version Control with Git and GitHub\nCourse Pre-reqs: Introduction to Unix\nSubsequent Courses: Intermediate Version Control"}, {"color": "#FF6347", "id": "Intermediate Version Control", "label": "Intermediate Version Control", "level": 3, "shape": "dot", "size": 10, "title": "Course Name: Intermediate Version Control\nCourse Pre-reqs: Introduction to Version Control with Git and GitHub\nSubsequent Courses: None"}, {"color": "#FF6347", "id": "Introduction to Unix", "label": "Introduction to Unix", "level": 1, "shape": "dot", "size": 10, "title": "Course Name: Introduction to Unix\nCourse Pre-reqs: None\nSubsequent Courses: Introduction to Version Control with Git and GitHub"}]);
286286
edges = new vis.DataSet([{"arrows": "to", "from": "Introduction to R", "to": "Regression analysis with R", "width": 1}, {"arrows": "to", "from": "Introduction to R", "to": "Working With Data In R", "width": 1}, {"arrows": "to", "from": "Regression analysis with R", "to": "Advanced Regression Analysis With R ", "width": 1}, {"arrows": "to", "from": "Introduction to Version Control with Git and GitHub", "to": "Intermediate Version Control", "width": 1}, {"arrows": "to", "from": "Introduction to Unix", "to": "Introduction to Version Control with Git and GitHub", "width": 1}]);
287287

288288
nodeColors = {};

individual_modules/introduction_to_unix/find.ipynb

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,15 @@
243243
"\n",
244244
"Which command would result in the following output:\n",
245245
"```\n",
246+
"`and the presence of absence:`\n",
247+
"```\n",
248+
"\n",
246249
"```\n",
247-
"and the presence of absence:\n",
248250
"1. `grep \"of\" haiku.txt`\n",
249251
"2. `grep -E \"of\" haiku.txt`\n",
250252
"3. `grep -w \"of\" haiku.txt`\n",
251253
"4. `grep -i \"of\" haiku.txt`\n",
254+
"```\n",
252255
"\n",
253256
"`````{admonition} Solution\n",
254257
":class: dropdown\n",
@@ -286,7 +289,7 @@
286289
"2012-11-07,bear,1\n",
287290
"```\n",
288291
"\n",
289-
"She wants to write a shell script that takes a species as the first command-line argument and a directory as the second argument. The script should return one file called `<species>.txt` containing a list of dates and the number of that species seen on each date. For example using the data shown above, `rabbit.txt` would contain:\n",
292+
"She wants to write a shell script that takes a species as the first command-line argument and a directory as the second argument. The script should return one file called `<species>.txt` containing a list of dates and the number of that species seen on each date. For example, using the data shown above, `rabbit.txt` would contain:\n",
290293
"\n",
291294
"```\n",
292295
"2012-11-05,22\n",
@@ -559,16 +562,16 @@
559562
"`````{admonition} Solution\n",
560563
":class: dropdown\n",
561564
"Option 1. is correct. Putting the match expression in quotes prevents the shell expanding it, so it gets passed to the `find` command.\n",
562-
"Option 2 is also works in this instance because the shell tries to expand `*.dat` but there are no `*.dat` files in the current directory, so the wildcard expression gets passed to `find`.\n",
563-
"We first encountered this in Working With Files and Directories Option 3 is incorrect because it searches the contents of the files for lines which do not match 'unicorn', rather than searching the file names.\n",
565+
"Option 2 also works in this instance because the shell tries to expand `*.dat` but there are no `*.dat` files in the current directory, so the wildcard expression gets passed to `find`.\n",
566+
"We first encountered this in Working With Files and Directories. Option 3 is incorrect because it searches the contents of the files for lines which do not match 'unicorn', rather than searching the file names.\n",
564567
"`````\n",
565568
"\n",
566569
"\n",
567570
"\n",
568571
"## Binary Files\n",
569572
"We have focused exclusively on finding patterns in text files. What if your data is stored as images, in databases, or in some other format?\n",
570-
"A handful of tools extend `grep` to handle a few non text formats. But a more generalizable approach is to convert the data to text, or extract the text-like elements from the data. On the one hand, it makes simple things easy to do. On the other hand, complex things are usually impossible. For example, it's easy enough to write a program that will extract X and Y dimensions from image files for `grep` to play with, but how would you write something to find values in a spreadsheet whose cells contained formulas?\n",
571-
"A last option is to recognize that the shell and text processing have their limits, and to use another programming language. When the time comes to do this, don't be too hard on the shell: many modern programming languages have borrowed a lot of ideas from it, and imitation is also the sincerest form of praise.\n",
573+
"A handful of tools extend `grep` to handle a few non-text formats. But a more generalizable approach is to convert the data to text, or extract the text-like elements from the data. On the one hand, it makes simple things easy to do. On the other hand, complex things are usually impossible. For example, it's easy enough to write a program that will extract X and Y dimensions from image files for `grep` to play with, but how would you write something to find values in a spreadsheet whose cells contained formulas?\n",
574+
"A last option is to recognize that the shell and text processing have their limits, and to use another programming language. When the time comes to do this, don't be too hard on the shell - many modern programming languages have borrowed a lot of ideas from it, and imitation is the sincerest form of praise!\n",
572575
"\n",
573576
"The Unix shell is older than most of the people who use it. It has\n",
574577
"survived so long because it is one of the most productive programming\n",

individual_modules/introduction_to_unix/loop.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@
650650
"\n",
651651
"`````{admonition} Solution\n",
652652
":class: dropdown\n",
653-
"The second version is the one we want to run. This prints to screen everything enclosed in the quote marks, expanding the loop variable name because we have prefixed it with a dollar sign. It also *does not* modify nor create the file `all.pdb`, as the `>>` is treated literally as part of a string rather than as a redirection instruction.\n",
653+
"The second version is the one we want to run. This prints to screen everything enclosed in the quote marks, expanding the loop variable name because we have prefixed it with a dollar sign. It also *does not* modify or create the file `all.pdb`, as the `>>` is treated literally as part of a string rather than as a redirection instruction.\n",
654654
"The first version appends the output from the command `echo cat $datafile` to the file, `all.pdb`. This file will just contain the list; `cat cubane.pdb`, `cat ethane.pdb`, `cat methane.pdb` etc.\n",
655655
"Try both versions for yourself to see the output! Be sure to open the `all.pdb` file to view its contents.\n",
656656
"\n",

individual_modules/introduction_to_unix/questions/summary_loop.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"feedback": "Incorrect"
7272
},
7373
{
74-
"answer": "it prevents the use of certain commands",
74+
"answer": "It prevents the use of certain commands",
7575
"correct": false,
7676
"feedback": "Incorrect"
7777
}

individual_modules/introduction_to_unix/questions/summary_script.json

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
]
2727
},
2828
{
29-
"question": "Which command is used to run a shell script names script.sh?",
29+
"question": "Which command is used to run a shell script named script.sh?",
3030
"type": "many_choice",
3131
"answers": [
3232
{
@@ -50,31 +50,5 @@
5050
"feedback": "Incorrect"
5151
}
5252
]
53-
},
54-
{
55-
"question": "In a shell script, what does \$1 represent?",
56-
"type": "many_choice",
57-
"answers": [
58-
{
59-
"answer": "The scripts names",
60-
"correct": false,
61-
"feedback": "Incorrect"
62-
},
63-
{
64-
"answer": "The first arguement passed to the script",
65-
"correct": true,
66-
"feedback": "Correct"
67-
},
68-
{
69-
"answer": "The first line of the script",
70-
"correct": false,
71-
"feedback": "Incorrect"
72-
},
73-
{
74-
"answer": "The current directory",
75-
"correct": false,
76-
"feedback": "Incorrect"
77-
}
78-
]
7953
}
8054
]

0 commit comments

Comments
 (0)