107 lines
4.2 KiB
XML
107 lines
4.2 KiB
XML
|
<?xml version='1.0'?>
|
||
|
|
||
|
<!DOCTYPE cscpage SYSTEM "../csc.dtd">
|
||
|
|
||
|
<cscpage title="UNIX 102 Tutorial Information">
|
||
|
<header />
|
||
|
|
||
|
<section title="UNIX 102 Reference Material">
|
||
|
<p>
|
||
|
This page contains some links to material covered during UNIX 101 and 102,
|
||
|
as well as some extracurricular content for you to review in your free
|
||
|
time.
|
||
|
</p>
|
||
|
<p>
|
||
|
Download the <a href="unix101.pdf">slides</a> or <a href="cheatsheet.pdf">cheatsheet</a> handout from UNIX 101.
|
||
|
</p>
|
||
|
</section>
|
||
|
|
||
|
<section title="vim References">
|
||
|
<p>
|
||
|
First and foremost, make sure you have tried running vimtutor. This
|
||
|
program is available on the CSC systems, as well as the student.cs and
|
||
|
student.math environments. Try the following commands from a shell:
|
||
|
<pre>
|
||
|
ssh userid@linux.student.cs.uwaterloo.ca
|
||
|
vimtutor
|
||
|
</pre>
|
||
|
This <a href="http://newbiedoc.sourceforge.net/text_editing/vim.html#BUILT-IN-HELP-VIM">document</a> from sourceforge should also prove to be useful.
|
||
|
</p>
|
||
|
</section>
|
||
|
|
||
|
<section title="bash References">
|
||
|
<p>
|
||
|
From the GNU bash reference manual (a very good source of information,
|
||
|
albeit a little arcane and verbose):
|
||
|
</p>
|
||
|
<ul>
|
||
|
<li><a href="http://www.gnu.org/software/bash/manual/bash.html#What-is-a-shell_003f">What is a shell?</a></li>
|
||
|
<li><a href="http://www.gnu.org/software/bash/manual/bash.html#Redirections">Redirecting input/output</a></li>
|
||
|
<li><a href="http://www.gnu.org/software/bash/manual/bash.html#Pattern-Matching">Globbing</a></li>
|
||
|
<li><a href="http://www.gnu.org/software/bash/manual/bash.html#Quoting">Quotes/escapes</a></li>
|
||
|
<li><a href="http://www.gnu.org/software/bash/manual/bash.html#Compound-Commands">Conditional and looping constructs</a></li>
|
||
|
<li><a href="http://www.gnu.org/software/bash/manual/bash.html#Shell-Parameters">Shell variables</a> (including <a href="http://www.gnu.org/software/bash/manual/bash.html#Special-Parameters">special variables</a>)</li>
|
||
|
</ul>
|
||
|
<p>
|
||
|
Here are some example bash scripts covered in today's lecture:
|
||
|
</p>
|
||
|
<ul>
|
||
|
<li>Simple script whose parameters are any number of text files, that will
|
||
|
print all the files and filenames to standard output: appender</li>
|
||
|
<li>Simple renaming script that takes two strings, one to replace with the
|
||
|
other, and renames all files in the current directory as specified:
|
||
|
renamer</li>
|
||
|
<li>Script that scrapes concert website for tickets and sends emails/text
|
||
|
messages when tickets are available: tickets_email</li>
|
||
|
</ul>
|
||
|
</section>
|
||
|
|
||
|
<section title="Regular Expression References">
|
||
|
<p>
|
||
|
This
|
||
|
<a href="http://www.regular-expressions.info/quickstart.html">page</a>
|
||
|
is a good brief reference for regular expressions.
|
||
|
</p>
|
||
|
</section>
|
||
|
|
||
|
<section title="git References">
|
||
|
<p>
|
||
|
Here's an article I found claiming to list the <a href="http://sixrevisions.com/resources/git-tutorials-beginners/">top 10 git tutorials</a>.
|
||
|
Whether or not that's true, you should still learn something.
|
||
|
Here is also a brief review of the commands we covered today.
|
||
|
</p>
|
||
|
<p> This clones a copy of the codebase for you to work on locally:
|
||
|
<pre>
|
||
|
git clone
|
||
|
</pre>
|
||
|
This "pulls" (updates with) any new changes others have made since you last
|
||
|
worked on the code, so they are now part of your local code:
|
||
|
<pre>
|
||
|
git pull
|
||
|
</pre>
|
||
|
This commits any of the changes that you've recently made in [files] (or -a
|
||
|
for everything), getting ready to "push" the changes to other users:
|
||
|
<pre>
|
||
|
git commit [files] (-a)
|
||
|
</pre>
|
||
|
This "pushes" (sends) your changes back to the "master" repository,
|
||
|
allowing other people working on the project to "pull" your changes.
|
||
|
<pre>
|
||
|
git push
|
||
|
</pre>
|
||
|
</p>
|
||
|
</section>
|
||
|
|
||
|
<section title="Beyond UNIX 10X">
|
||
|
<p>
|
||
|
You might be surprised - almost all the information on this page was at
|
||
|
one point found using Google. Remember, your best resources for learning
|
||
|
more about UNIX are your friends, your manpages, and the internet. So
|
||
|
fire up your favorite search engine, and get learning!
|
||
|
</p>
|
||
|
</section>
|
||
|
|
||
|
|
||
|
<footer />
|
||
|
</cscpage>
|