Week 8’s lecture returned to the UNIX shell for some more in depth analysis. The tutorial was dedicated to Squid Proxy Server and how to run it from shell.
First off, the lecture on Shell Scripting:
Pearl of the week – Shell Operators:
-
$ jobs – show processes
-
> – Output to (> overwrite, >> append, 2> error redirect)
-
< – Input from ( sort < templist)
-
| – pipeline (ls -l | grep myfile)
-
* ? [] – pattern matching
-
$ echo ‘pwd ‘ – removes command
-
echo `pwd` – ensures command called
-
& – appended to the end of a command puts it to background
-
Predefined variables:
-
$HOME the full pathname of your home directory
-
$PATH a list of directories to search for commands
-
$MAIL the full pathname of your mail box
-
$USER your user id
-
$SHELL the full pathname of your login shell
-
$TERM the type of your terminal
-
-
Assigning variables – $ person=mark
-
\ <- escape clause
-
who | tee unsortedusers | sort | tee sortedusers
The tutorial on Squid Proxy Server was straight forward working through the readme instructions.