CpSc 317 -- Scripting Languages - Week 1

About the course: scripting languages

  1. JavaScript
  2. UNIX shell
  3. CGI (rather http://obsidian.sru.edu/~username/cgi/yourscript)
  4. PHP

Equipment and labs: ATSH 224  granite, obsidian, accounts, etc.


Class home page

Class resources

Requirements on homework: 

Obsidian and web services: (from our tech support):
The students will login with their regular network credentials.  If they PuTTY into Obisidan the login is “SRUNET\<username>”.  They can access their web folder on Obsidian at “/var/www/html/users/<username>” or http://obsidian.sru.edu/users/<username>

To make a "shortcut" (an environment variable initialized upon login) to that, place the lines 

export cw="cd http://obsidian.sru.edu/users/<username>"
export www="http://obsidian.sru.edu/users/<username>"

in your file named .bashrc . It may then be retrieved via $www, as in the commands ls $www or simply $cw.

If you need to make a file readable by a script, you may need to run the command 

chcon -t httpd_sys_content_t filename

Assignment #1: Due Friday September 2.

 e-mail me (as per above instructions) verifying the status of

  1. your e-mail account
  2. your obsidian account (you should be able to login using your standard campus username and password)
  3. your web and cgi directories (see instructions below about "making and testing your web and cgi directory )
Assignment #1B: Due Friday September 2.

required assignment: log onto D2L and take the Junior survey 

go to D2L, maybe through MySRU or perhaps though https://sru.desire2learn.com/

Once you are in D2L, the Junior survey can be found under "Ongoing section -> Computing Students Survey -> More -> Surveys ->  Junior Survey - Fall 2016."

.. just click on the survey and follow the instructions from that point on.

Note: You don't need to email me about the completion of this assignment, since I'll be hearing from the higher ups (like maybe the governor?) if you don't do it. 

Assignment#2 Due: TBA, this is to make sure that your JavaScript is up to speed (i.e., that you learned what you should have in CPSC217)

What you should know:

  1. HTML -- tables, forms, images, frames
  2. JavaScript -- DOM, innerHTML, functions, looping and conditionals, form elements, event handling.
  3. UNIX -- basic navigation, shell scripting, sed, awk, loops, variables
  4. Networks -- browser, IP, DNS, HTTP, telnet, ftp, Homesite networking


  1. A UNIX shell script at work:

Enter two strings. We'll see if we can find an English word which contains both as substrings:

How it works


  1. Readings on JavaScript.
  2. Making and testing your web and cgi directories
  3. Resetting your UNIX prompt, so it shows what directory you are in.
  4. Some of you who have been using the Firefox browser from within Linux may have a problem with disk quota. Jonathon Litz offers this advice.
  5. Slicing in Photoshop (may help with Assignment 2)
  6. Web audio standards Those interested more in sound/music than graphics may want to start learning about this
Informational: A review of web hosting services