Exercises, examples and other material relating to training module A172. This module is presented on
Private Courses and
Specially Run Courses only
div class= introhead Korn Shell Programming
/div
div class= introsubheads A FIRST PROGRAM AND A FIRST CONDITIONAL BR /div
Here s what you might ... http://www.wellho.net/solutions/general- ... ction.html [longer article] |
div class= introhead What is a Shell Program / Script
/div
A Shell is a program which reads user inputs and controls program output - a command line ... http://www.wellho.net/solutions/general- ... asics.html [longer article] |
div class= introhead Storing a Korn shell program in a file
/div
You won t always want to re-type your Korn shell instructions each time you want ... http://www.wellho.net/solutions/general- ... mands.html [longer article] |
• In the Korn Shell, variables default to be being strings ...
$ r 26
kay=7
$ r 30
while (( $kay>3 )); do
echo $kay
kay=$kay-1
done;
7
7-1
7-1-1
... http://www.wellho.net/mouth/1659_Str ... ables.html [short article] |
#!/usr/bin/ksh
county=Wiltshire
town[0]=Swindon
town[1]=Salisbury
town[2]=Chippenham
town[3]=Trowbridge
town[4]=Melksham
town[5]='Wootton Bassett'
print ... http://www.wellho.net/resources/ex.php4?item=a172/sharon [code sample] |
1. If you set PS1 to a string that contains a "!" character, then you'll get the current history number reported as part of the prompt. If you want ... http://www.wellho.net/mouth/1367_kor ... iques.html [short article] |
It's been quite a while since I presented a course that majored on the Korn Shell - I know the subject right enough (having written a complete 2 day course ... http://www.wellho.net/mouth/1361_Kor ... ourse.html [short article] |
This module is presented on
Private Courses and
Specially Run Courses only
Examples from our training material
Background information
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
Introduction to Shells and the Korn Shell.
Korn Shell Basics.
Metacharacters, quoting, pipes and redirection.
Continuation and line splitting.
History. Storing a script in a file.
Startup files.
Builtins, special commands and external commands.
Aliases. Functions.
if, elif and fi.
while, do, done.
Until and for.
case and esac.
break, continue and return.
Arrays in Ksh. Integer Arithmetic.
Logical tests - commands and others
Testing files, numbers and strings.
Handling command line parameters.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our
Listing and schedule page.
Well House Consultants specialise in training courses in
Linux and LAMP,
Python,
Perl,
PHP, and
MySQL. We run
Private Courses throughout the UK (and beyond for longer courses), and
Public Courses 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.