From 8da87db763f7c4c6592c7ec017604914482790a8 Mon Sep 17 00:00:00 2001
From: Elana Hashman
Date: Thu, 8 Mar 2012 19:21:51 -0500
Subject: [PATCH] Final additions to the UNIX102 page, including another bash
script and a few changes to the text.
---
unix102/Makefile | 2 +-
unix102/index.xml | 16 ++++++++--------
unix102/walkc.sh | 11 +++++++++++
3 files changed, 20 insertions(+), 9 deletions(-)
create mode 100755 unix102/walkc.sh
diff --git a/unix102/Makefile b/unix102/Makefile
index c2a58c8..16e35a5 100644
--- a/unix102/Makefile
+++ b/unix102/Makefile
@@ -1,3 +1,3 @@
-FILES = index.html cheatsheet.pdf unix101.pdf vim_exercise.tar appender.sh tickets_email.sh queue.txt
+FILES = index.html cheatsheet.pdf unix101.pdf vim_exercise.tar appender.sh tickets_email.sh walkc.sh queue.txt
RELDIR = unix102/
include ../common.mk
diff --git a/unix102/index.xml b/unix102/index.xml
index a8424df..adbed9a 100644
--- a/unix102/index.xml
+++ b/unix102/index.xml
@@ -7,19 +7,19 @@
-
- This page contains some links to material covered during UNIX 101 and 102,
+ 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.
- The text file for the great editor race is available here.
+ The text file for the great editor race is available here.
To begin with the first exercise, you will need the following file.
- To download it, execute the following command:
+ To download it and untar it, execute the following commands:
wget http://csclub.uwaterloo.ca/unix102/vim_exercise.tar
+ tar -xvf vim_exercise.tar
@@ -58,11 +58,11 @@
- Simple script whose parameters are any number of text files, that will
- print all the files and filenames to standard output: appender
+ print all the files and filenames to standard output: appender
- RunC clone, that takes in a filename and executes all the tests it
- can find for it in the current directory: WalkC
+ can find for it in the current directory: WalkC
- Script that scrapes concert website for tickets and sends emails/text
- messages when tickets are available: tickets_email
+ messages when tickets are available: tickets_email
@@ -80,7 +80,7 @@
reference, of course. As well, here's an article I found claiming to list
the top 10 git tutorials.
Whether or not that's true, you should still learn something.
- Here is also a brief review of the commands we covered today.
+ Here is also a brief review of the commands we intended to cover today.
This clones a copy of the codebase for you to work on locally:
diff --git a/unix102/walkc.sh b/unix102/walkc.sh
new file mode 100755
index 0000000..75743a7
--- /dev/null
+++ b/unix102/walkc.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+BASE=`basename $1 .c`
+
+gcc -Wall $1 -o $BASE
+
+for TEST in $BASE.in.*
+do
+ OUT=`echo -n $TEST | sed -e s/in/out/`
+ ./$BASE < $TEST > $OUT
+done