How to read this document
$
represents your prompt, and should not be typed in.
Login and Shell
You have two ways to login to one of the lab machines: In ITD415 (or GC112) simply login to one of the workstations From another location, use secure shell (ssh - use putty if you're logging in from a Windows machine):
use the following hostname: id415mxx.cs.unb.ca (where xx is between 1 and 40). For example, to login from another Linux/UNIX machine:
$ ssh id415m17.cs.unb.ca
when prompted, type in your username and password (remember: both are case-sensitive - smith is not the same as SMITH!)
In this course we'll often need to work from the command line, that is we'll use the bash shell directly via a terminal window. To open a terminal window, click on the terminal icon in the "Applications" menu.
Running Programs on the command line
To execute hello, type:
$ ./hello
The "./" is essential.
To execute hello
taking input from file foo
,
$ ./hello < foo
To execute hello
taking input from file foo
, and writing output to bar
$ ./hello < foo > bar
running javascript from the command line
If hello.js
is your (text only) javascript program, you can run it
in the lab machines with
$ rhino hello.js
There are small non-obvious differences between rhino
and the browser
.
Make a record of your session
$ script
run your commands
$ exit
You commands (and their output) is saved in a file typescript
This is likely to be somewhat ugly to look at because of escape codes. Just hand in the raw version.