Schedule
Labs
Assignments
TA office hours
Topic videos
Some course notes
Extra problems
Lecture recordings
In this hypothetical example, you are a very silly person. Your home directory is /u/csc209h/summer/pub/silly. In there you have created a 'bin' directory containing a command named "cat" which says "meow".
You put this directory in your PATH, of course. Putting this directory in your PATH might even be the system default.
To experience this, in sh type:
or in tcsh type:PATH=/u/csc209h/summer/pub/silly/bin:/bin:/usr/bin export PATH
set path = (/u/csc209h/summer/pub/silly/bin /bin /usr/bin)
Type "cat" and see it say "meow".
Now try running some shell scripts which don't set the PATH variable, and some which do.
(If you don't have any examples lying around, try /u/csc209h/summer/pub/silly/script1 and /u/csc209h/summer/pub/silly/script2. Usage: sh script[12] file.)