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

2. How to Run Tutch

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

The executable files tutch, submit and status you need for the course are installed in /afs/andrew/scs/cs/15-399/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/scs/cs/15-399/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/scs/cs/15-399/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/scs/cs/15-399/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

 
#!/bin/csh
# file: tutch
/afs/andrew/scs/cs/15-399/bin/tutch $*
#EOF

 
#!/bin/csh
# file: submit
/afs/andrew/scs/cs/15-399/bin/submit $*
#EOF

 
#!/bin/csh
# file: status
/afs/andrew/scs/cs/15-399/bin/status $*
#EOF

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] [ ? ]

This document was generated by Andreas Abel on October, 24 2002 using texi2html