Week 5 notes

Concepts

Variables - Enviornment variables are named pieces of data, initilized by a shell or by a script run in that shell.

Logical statments - There are a few core constructs in programming. Versions of these are avilible in most shells.

Return Values - When a progam finishes it may set a variable on the way out. This is called a return value.

Continuing Borne shell

Variables

Variables for addressing background processes Managing background processes Control structures

Aditional Borne stuff

Script Homework

namekill - write a script that takes a string of characters as an argument and kills all processes containng that string in their name.

userprog - Using the w command in a script, list all users running a program containing a string of characters passed as an agrument to the script.

extra credit... userprogbg - Just like userprog but it does error checking (a simple test should do it: hint hint) to see if an argument was passed.