fix link to regex resource and update pt 2 slides

This commit is contained in:
Natalie Elphick 2024-03-12 10:04:42 -07:00
parent da9e3819db
commit b2644a413d
4 changed files with 32 additions and 34 deletions

View file

@ -2266,9 +2266,9 @@ macOS 14.1 January 9, 2021 macOS 14.1</code></pre>
data</li>
<li><strong>Strings</strong> : sequence of characters</li>
</ul>
<pre class="text"><code>message=&quot;Hello, World!&quot;
<pre class="text"><code>message=&quot;Hello, World&quot;
echo $message</code></pre>
<pre><code>Hello, World!</code></pre>
<pre><code>Hello, World</code></pre>
<p>Here, we assign the string “Hello, World!” to the variable
<code>message</code> and use echo to print its value.</p>
</section>
@ -2351,8 +2351,8 @@ size)</li>
</ul>
<pre class="text"><code>ls -lah part_1</code></pre>
<pre><code>total 8
drwx---rw-@ 4 nelphick staff 128B Mar 11 10:11 .
drwxr-xr-x@ 5 nelphick staff 160B Mar 11 10:11 ..
drwx---rw-@ 4 nelphick staff 128B Mar 12 09:18 .
drwxr-xr-x@ 5 nelphick staff 160B Mar 12 09:27 ..
-rw-r--r--@ 1 nelphick staff 0B Apr 11 2023 .hidden_file.txt
-rw-r--r--@ 1 nelphick staff 60B Apr 12 2023 list_numbers.tsv</code></pre>
</section>
@ -2365,8 +2365,8 @@ ls -l</code></pre>
<pre><code>cd ..
ls -l</code></pre>
<pre><code>total 0
drwx---rw-@ 4 nelphick staff 128 Mar 11 10:11 part_1
drwxr-xr-x@ 3 nelphick staff 96 Mar 11 10:11 part_2</code></pre>
drwx---rw-@ 4 nelphick staff 128 Mar 12 09:18 part_1
drwxr-xr-x@ 3 nelphick staff 96 Mar 12 09:27 part_2</code></pre>
</section></section>
<section>
<section id="creating-and-altering-files" class="title-slide slide level1">
@ -2441,7 +2441,9 @@ used on <strong>cannot be recovered</strong></li>
<pre class="text"><code>du -h */*</code></pre>
<pre><code> 0B new_directory/new_file1.txt
4.0K part_1/list_numbers.tsv</code></pre>
<p>-h - Displays the output in human readable format</p>
<ul>
<li>h - Displays the output in human readable format</li>
</ul>
</section>
<section id="check-in" class="slide level2">
<h2>Check-in</h2>
@ -2573,7 +2575,7 @@ directory</li>
<section id="regular-expressions" class="slide level2">
<h2>Regular Expressions</h2>
<ul>
<li>For a more extensive overview of regular expressions click <a href="https://v4.software-carpentry.org/regexp/index.html">here</a></li>
<li>For a more extensive overview of regular expressions click <a href="https://regexone.com/lesson/introduction_abcs">here</a></li>
<li>Some basic ones are:
<ul>
<li>” ^ ” Matches the beginning of a line</li>

View file

@ -1932,7 +1932,7 @@ files and/or folders that have been compressed</p>
du -h part_2/homo_sapiens.refseq.tsv</code></pre>
<pre><code> 33M part_2/homo_sapiens.refseq.tsv</code></pre>
<ul>
<li>The uncompressed file is 27 megabytes</li>
<li>The uncompressed file is 33 megabytes</li>
</ul>
<pre class="text"><code>gzip part_2/homo_sapiens.refseq.tsv
du -h part_2/homo_sapiens.refseq.tsv.gz</code></pre>
@ -1961,9 +1961,9 @@ compressed archive files</li>
<pre class="text"><code>tar -czf part_1.tar.gz part_1
ls -l</code></pre>
<pre><code>total 8
drwx---rw-@ 4 nelphick staff 128 Mar 11 10:11 part_1
-rw-r--r--@ 1 nelphick staff 800 Mar 11 10:11 part_1.tar.gz
drwxr-xr-x@ 4 nelphick staff 128 Mar 11 10:11 part_2</code></pre>
drwx---rw-@ 4 nelphick staff 128 Mar 12 09:36 part_1
-rw-r--r-- 1 nelphick staff 803 Mar 12 10:00 part_1.tar.gz
drwxr-xr-x@ 4 nelphick staff 128 Mar 12 10:00 part_2</code></pre>
<ul>
<li>-c: create a new archive</li>
<li>-f: specify the name of the archive file</li>
@ -2024,8 +2024,11 @@ systems state</li>
<li><strong>$PWD</strong> : The working directory</li>
<li><strong>$HOME</strong> : The current users home directory</li>
<li><strong>$PS1</strong> : the shell prompt string</li>
<li><strong>$TEMP</strong> : location of temporary files</li>
<li><strong>$TMPDIR</strong> : location of temporary files</li>
</ul>
<p>These can change depending on the specific OS or program,
<strong>TMPDIR</strong> can also be <strong>TEMP</strong>,
<strong>TEMPDIR</strong> and <strong>TMP</strong>.</p>
</section>
<section id="path-locations-of-executable-files" class="slide level2">
<h2>PATH: locations of executable files</h2>
@ -2106,13 +2109,13 @@ interpreter is</li>
<li>By default, files are not executable</li>
</ul>
<pre class="text"><code>ls -l part_2/example_script.sh</code></pre>
<pre><code>-rw-r--r--@ 1 nelphick staff 287 Mar 11 10:11 part_2/example_script.sh</code></pre>
<pre><code>-rw-r--r-- 1 nelphick staff 287 Mar 12 10:00 part_2/example_script.sh</code></pre>
<ul>
<li>We can set the execute bit like this</li>
</ul>
<pre class="text"><code>chmod u+x part_2/example_script.sh
ls -l part_2/example_script.sh</code></pre>
<pre><code>-rwxr--r--@ 1 nelphick staff 287 Mar 11 10:11 part_2/example_script.sh</code></pre>
<pre><code>-rwxr--r-- 1 nelphick staff 287 Mar 12 10:00 part_2/example_script.sh</code></pre>
</section>
<section id="example" class="slide level2">
<h2>Example</h2>
@ -2188,7 +2191,7 @@ fi # end if statement</code></pre>
language</li>
<li>It reads and modifies text line by line from a file or input
stream</li>
<li>Supports <a href="https://v4.software-carpentry.org/regexp/index.html">regular
<li>Supports <a href="https://regexone.com/lesson/introduction_abcs">regular
expressions</a></li>
<li>Useful for replacing text</li>
</ul>
@ -2283,12 +2286,6 @@ Bruce Barnett</a></li>
<section id="end-of-part-2" class="title-slide slide level1">
<h1>End of Part 2</h1>
</section>
<section id="survey" class="slide level2">
<h2>Survey</h2>
<ul>
<li>Please take some time to fill out the workshop survey: <a href="https://www.surveymonkey.com/r/DY7K5ZY" class="uri">https://www.surveymonkey.com/r/DY7K5ZY</a></li>
</ul>
</section>
<section id="additional-learning-materials" class="slide level2">
<h2>Additional learning materials</h2>
@ -2307,11 +2304,11 @@ Line</a></li>
</ul></li>
</ul>
</section>
<section id="survey-1" class="slide level2">
<section id="survey" class="slide level2">
<h2>Survey</h2>
<ul>
<li>Please take some time to fill out the workshop survey:<br />
<a href="https://www.surveymonkey.com/r/F75J6VZ" class="uri">https://www.surveymonkey.com/r/F75J6VZ</a></li>
<a href="https://www.surveymonkey.com/r/DY7K5ZY" class="uri">https://www.surveymonkey.com/r/DY7K5ZY</a></li>
</ul>
</section>
<section id="upcoming-data-science-training-program-workshops" class="slide level2">