Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
For 2023 - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))

Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
Web Application Deployment module A172
Korn Shell - interactive and programming facilities
Exercises, examples and other material relating to training module A172. This module is presented on Private Courses and Specially Run Courses only

Related technical and longer articles
Korn Shell Scripting - an introduction
Korn Shell - History, storing to file, commands
Korn Shell - Basics

Articles and tips on this subjectupdated
1660Korn shell - some nuggets
I've presented some Korn Shell Training over the last couple of days ,,, and I cut and pasted a few snippets which I thought might be of interest. • Korn Shell - looping through a series of outputs from a command $ for file in `ls`; do > echo $file > done LinuxBasicsAdmin.book.pdf Sefas.book.pdf dat_backup dat_backup2 dat_backup3 filestat funky gvar hello_korn kornserver.cgi ksh.book.pdf ksh.ps numtee pippa script_korn selk sharon stroppy townline tracey $ ...
1659String, Integer, Array, Associative Array - ksh variables
• 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 7-1-1-1 $ • ... but you can declare them as integers. $ integer kay $ kay=7 $ kay=$kay-1 $ echo $kay $ (( g = 8+8 )) $ echo $g 16 $ h=8+8 $ echo ...
1658Some useful variables and settings in the Korn Shell
Here are some hidden "gems" ... • -C sets "noclobber" mode in which redirects do not overwrite files $ set -C $ $ ls > fred $ ls > fred ksh: cannot create fred: File exists $ set +C $ ls > fred $ • CDPATH lets you change the target for your cd command to a list of directories whihc are ...
1367korn tips - some useful korn shell techniques
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 to rerun the same command number 246 later, all you then need to do is type r 246 2. If you're debugging a Korn shell script and want to work out what ...
1365Korn Shell scripts on the web
I know that the Korn shell isn't exactly the most common language for web scripting ;-) .... but if you've got a load of Korn shell scripts and a heap of Korn shell experts ... why not? "How would you do it" I was asked yesterday and I put together a tiny demo to show some of the first principles. ...
1364Korn shell course - resources
I'm running a Korn shell course today and happened to take a "snap" of the resources set out ready for the course start. * Sign in sheet * One laptop computer, with appropriate software, per delegate * One set of course notes, approx 80 pages per day, per delegate * One regular expression mousemat ...
1361Korn shell course
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 that got rave if niche reviews during a previous lifetime), and I jumped at a chance to brush up on my old skills to day, to recall the differences ...
Examples from our training material
dat_backup   Simple shell script to back up file
dat_backup2   Uses bourne shell compatible tests
dat_backup3   Korn shell conditional testing
filestat   Comparing one or two files
funky   Define a function - Korn shell
gvar   ksh - global and local variables
hello_korn   Korn shell commands in a file
kornserver.cgi   Korn shell / web script using CGI
numtee   Korn Shell - numeric (integer) testing
pippa   Setting up and referencing a Ksh array
script_korn   Korn shell script
selk   Korn Shell - Select example
sharon   for loop - Korn Shell
stroppy   String Test Operators
townline   Selects a town ending
tracey   Korn shell array and while loop
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 [here].
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,Ruby, Lua, 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.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2023: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/resources/A172.html • PAGE BUILT: Sun Oct 11 14:50:09 2020 • BUILD SYSTEM: JelliaJamb