Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a526097

Browse files
Sync Unix Jupyter notebook with Markdown version
1 parent ce3dce3 commit a526097

File tree

2 files changed

+59
-10
lines changed

2 files changed

+59
-10
lines changed

‎notebooks/unix_outline.ipynb‎

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,32 @@
1111
"# Linux/Unix Command and Bash Scripting"
1212
]
1313
},
14+
{
15+
"cell_type": "markdown",
16+
"metadata": {},
17+
"source": [
18+
"## Getting Started"
19+
]
20+
},
21+
{
22+
"cell_type": "markdown",
23+
"metadata": {},
24+
"source": [
25+
"This lecture can be found on `state`.\n",
26+
"\n",
27+
"Let's all SSH into `state`.\n",
28+
"\n",
29+
"```sh\n",
30+
"ssh leunge@state.ohsu.edu\n",
31+
"```\n",
32+
"\n",
33+
"And navigate to your folder.\n",
34+
"\n",
35+
"```sh\n",
36+
"cd /home/courses/BMI565/students\n",
37+
"```"
38+
]
39+
},
1440
{
1541
"cell_type": "markdown",
1642
"metadata": {
@@ -910,6 +936,13 @@
910936
"- [Bash One-Liners Explained, Part III: All about redirections](http://www.catonmat.net/blog/bash-one-liners-explained-part-three/)"
911937
]
912938
},
939+
{
940+
"cell_type": "markdown",
941+
"metadata": {},
942+
"source": [
943+
"## Exercise Break! (See below)"
944+
]
945+
},
913946
{
914947
"cell_type": "markdown",
915948
"metadata": {},
@@ -1546,15 +1579,15 @@
15461579
"metadata": {},
15471580
"outputs": [],
15481581
"source": [
1549-
"echo \"#!/usr/bin/env bash\n",
1582+
"echo '#!/usr/bin/env bash\n",
15501583
"\n",
15511584
"head -n 1 ../README.md\n",
15521585
"\n",
15531586
"if [[ $? -eq 0 ]]; then\n",
1554-
" echo 'Successfully read beginning of file'; exit 0\n",
1587+
" echo \"Successfully read beginning of file\"; exit 0\n",
15551588
"else\n",
1556-
" echo 'Failed to read beginning of file'; exit 1\n",
1557-
"fi\" > test_exit_codes.sh\n",
1589+
" echo \"Failed to read beginning of file\"; exit 1\n",
1590+
"fi' > test_exit_codes.sh\n",
15581591
"\n",
15591592
"bash test_exit_codes.sh"
15601593
]
@@ -1783,6 +1816,13 @@
17831816
"- [Unix / Linux: sftp File From One Server To Another](https://www.cyberciti.biz/faq/sftp-file-from-server-to-another-in-unix-linux/)"
17841817
]
17851818
},
1819+
{
1820+
"cell_type": "markdown",
1821+
"metadata": {},
1822+
"source": [
1823+
"## Exercise Break! (See below)"
1824+
]
1825+
},
17861826
{
17871827
"cell_type": "markdown",
17881828
"metadata": {},
@@ -2004,9 +2044,9 @@
20042044
"all : file1_count.txt file2_count.txt file3_count.txt\n",
20052045
"\n",
20062046
"create :\n",
2007-
" echo -e \"1\\n2\\n3\\n4\\n5\\n6\" > file1.txt\n",
2008-
" echo -e \"Hello, world!\" > file2.txt\n",
2009-
" echo -e \"We're learning bash programming!\" > file3.txt\n",
2047+
" echo -e '1\\n2\\n3\\n4\\n5\\n6' > file1.txt\n",
2048+
" echo -e 'Hello, world!' > file2.txt\n",
2049+
" echo -e 'We're learning bash programming!' > file3.txt\n",
20102050
"\n",
20112051
"%_count.txt : %.txt\n",
20122052
" wc $< > $@\n",
@@ -2122,14 +2162,18 @@
21222162
"\n",
21232163
"### Exercise 2 Download Data and Chop It Up\n",
21242164
"\n",
2125-
"Create a bash script to download the processed Long Beach V.A. data `processed.va.data` from the [Heart Disease Data Set](https://archive.ics.uci.edu/ml/datasets/Heart+Disease)and filter out for just subjects with Class 0 (last column). Save this subset of the data to a separate file.\n",
2165+
"Create a bash script to download the processed Long Beach V.A. data `processed.va.data` from the [Heart Disease Data Set](https://archive.ics.uci.edu/ml/datasets/Heart+Disease)and filter out for just subjects with Class 0 (last column). Save this subset of the data to a separate file.\n",
21262166
"\n",
21272167
"The data can be found [here](https://archive.ics.uci.edu/ml/machine-learning-databases/heart-disease/).\n",
21282168
"\n",
2169+
"**Hint**: Use `wget'/`curl` to download file and `awk` to subset data.\n",
2170+
"\n",
21292171
"### Exercise 3 Search for Codons\n",
21302172
"\n",
21312173
"Using the random DNA sequence Python script from Exercise 1, generate a random sequence of DNA and count the number of times the DNA sequence \"TAA\" (a stop codon).\n",
21322174
"\n",
2175+
"**Hint**: Use `grep` to count number of occurrences. You can use the `-c` flag to `grep` to count things.\n",
2176+
"\n",
21332177
"**Bonus**: Simultaneously find all three stop codons: \"TAA\", \"TAG\", \"TGA\" and count them each."
21342178
]
21352179
},

‎notebooks/unix_outline_md.ipynb‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@
1515
"cell_type": "markdown",
1616
"metadata": {},
1717
"source": [
18-
"## Getting Started\n",
19-
"\n",
18+
"## Getting Started"
19+
]
20+
},
21+
{
22+
"cell_type": "markdown",
23+
"metadata": {},
24+
"source": [
2025
"This lecture can be found on `state`.\n",
2126
"\n",
2227
"Let's all SSH into `state`.\n",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /