[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2. How to Run Tutch

Disclaimer: This section applies to course 15-317 at Carnegie Mellon University only.

The executable files tutch, submit and status you need for the course are installed in /afs/andrew/course/15/317/bin. You have several possibilities to run them:

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1 Explicitely Specification of Path

You can just type in the complete path every time you run tutch, submit or status. E.g.

$ /afs/andrew/course/15/317/bin/tutch ...

Since this is tedious, we recommend one of the following more sophisticated methods.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.2 Setting Your Global Path

Under Unix, every time a shell is launched a startup script is executed. Usually this script is named `.shellnamerc' and is located in your home directory, e.g., `~/.cshrc' for the C SHell `csh'. To add the Tutch program location to your path, add the line

setenv PATH "${PATH}:/afs/andrew/course/15/317/bin"

to `~/.cshrc'. If you are using the Bourne Again SHell `bash', then add the following line to your script `~/.bashrc'.

export PATH="${PATH}:/afs/andrew/course/15/317/bin"

To determine whether you run `csh' or `bash', try echo $BASH or echo $SHELL. Only one of these should work and give you the shell you are running.

The changes in the startup scripts take effect whenever you open a new shell. To make the new path available immediately within your current shell, run source on the startup script, e.g.,

$ source ~/.cshrc

Sometimes the shell startup script has been created by your system administrator and looks complicated, possibly involving the execution of other scripts during startup. Usually the file then gives you instructions how to modify your path setting.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.3 Creating Intermediate Scripts

If you do not want to modify your global path and already have a directory in your path where you store your own executables, just add three files into this directory (usually named `~/bin'): tutch, submit and status

# file: tutch
/afs/andrew/course/15/317/bin/tutch $*

# file: submit
/afs/andrew/course/15/317/bin/submit $*

# file: status
/afs/andrew/course/15/317/bin/status $*

Then make them executable and add them to the known executables with the following commands (assuming you are in the right directory):

$ chmod +x tutch submit status
$ rehash

Two more possibilities are aliases and links.

[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

2.4 Running tutch on Windows

Make sure that your afs is mapped to your Z: drive. To invoke tutch you will then have to use "Z:\andrew\course\15\317\bin\tutch". Same with the commands submit and status.

As an alternative, you can map the directory "\afs\andrew\course\15\317\bin" to a new drive, say G. Then to invoke tutch you will just have to use "G:\tutch".

You can also add the whole path "Z:\andrew\course\15\317\bin" to your PATH variable. If you do not have that variable, you can create by right-clicking on "My Computer", then on "Properties". You will see the option "advanced" on the top right corner of the dialog box. Click on that and you will see "enivornmental variables" at the bottom. Click on this. Now you can create a new variable "PATH" by clicking on "New". After you have added the complete path to PATH, you should be able to invoke tutch, submit, status from any directory by simply typing the approriate command.

Whatever option you chose to use, make sure that afs is mapped to Z: drive

[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Andreas Abel on October, 24 2002 using texi2html and modified on February 2, 2007 by Evan Danaher.