Exercises, examples and other material relating to training module A167. This topic is presented on public courses Deploying LAMP - Linux, Apache, MySQL, Perl/PHP
, Linux Basics
, Deploying Java Applications on Linux / Unix
|Articles and tips on this subject||updated|
|3791||The Kernel, Shells and Daemons. Greek Gods in computing|
The Greek Gods didn't like washing up or ironing. So they employed mortals to to it. Problem was that those mortals didn't last for ever, and sometimes went on strike over one thing and another. So The Gods did a deal with some of the current batch of mortals, and it went like this: "We will make you ...
|1904||Ruby, Perl, Linux, MySQL - some training notes|
We have just come to the end of a solid 12 days of training ... and we are just getting ready for the next week, with delegates arriving this evening. There's a lot going on behind the scenes, even over this weekend, with the hotel to be prepared as well as the training course. (Picture - our clean ...
|1527||Selecting file names in a shell - one word or another|
If you want to select all file names that include the words "cat" or "dog" in them with file name matching, you can do so using curly braces - that's supported by most modern shells as part of what is known as "globbing".
Here's an example - I've just been copying images off my digital camera and I ...
|1468||Lexical v Arithemetic testing, Bash and Perl|
If you tell a story against someone, best to be telling it against yourself!
One of our web servers (running standard, not our own software behind the scenes) has been having a problem with handling denial of service attacks which are coming in from time to time ... and I have a monitoring script running ...
|1345||Perl and Shell coding standards / costs of an IT project|
There are three major staff costs in the life of an IT project - the specification and development of the system, the maintainance and upgrading of the system though its life, and the investment that's made in data entry and integrity through the life of the system. And although there's a lot of thought ...
|1287||Work and play at Well House Manor - Football and Shell Shortcuts|
We're running a Linux and LAMP course this week - great group and I'm going to be sorry when it's the end of the course.
Yesterday we had a cold buffet lunch for a change, and made the best of the lovely weather and spacious garden to relax for a while - we do a long day, and so a good break at lunch ...
|827||No news is good news with Unix and Linux|
No news is good news ... so says Linux and Unix. All processes return a status code, and you can expect that to be:
0 - success
1 - failure
2 - abject failure
So, for example, the grep utility returns a status as follows:
0 - found what you were looking for!
|749||Cottage industry or production line data handling methods|
If you're running a cottage industry, for efficiency's sake you'll run the first process on each of your raw components first, and store the partially-completed elements in a basket as they're processed. When you've completed that first process, you'll then apply the second process to each element ...
|64||Shell Script for CGI on the web|
In the course of duty (providing simple "how-to" examples), I've come up with a short shell script in the Bourne again shell that allows a rudimentary lookup in a data file on a server running CGI. Nothing special about this, except it's a short example.
Run it from this link and try putting in data ...
Examples from our training material
|datcopy|| Simple copy script to run from command line|
|dc4|| Data copy, loop to copy files one by one, checking |
|dc5|| Data copy, calculating statistics |
|dc_checked|| Data copy with conditional check |
|dci|| Data copy, use of shell variables |
|dcif|| Data copy, use of shell if statement |
|dcj|| Data copy, with command line parameter |
|lookup.sh|| Bourne Again Shell script for CGI Web server |
|skcount|| Skill counter - sample script in alternative Perl language |
|skillcounter|| Perl script - needs setting up to run as Linux command |
Some modules are available for download
as a sample of our material or under an Open Training Notes License
for free download from http://www.training-notes.co.uk
Topics covered in this module
What is shell programming?
Running a shell program from the command line
Conditional statements and variables.
Shell comparisons and arithmentic.
Functions and other features.
Bourne Again Shell scripts on a web page.
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule
Well House Consultants specialise in training courses in
Linux and LAMP
. We run
throughout the UK (and beyond for longer courses), and
at our training centre in Melksham, Wiltshire, England.
It's surprisingly cost effective to come on our public courses -
even if you live in a different
country or continent to us
We have a technical library of over 700 books on the subjects on which we teach.
These books are available for reference at our training centre. Also
available is the Opentalk
Forum for discussion of technical questions.