Spot-on, Frank. Thanks.

That makes me think of this:
'csh' is very popular with many Unix people.
But 'csh' is widely considered unsuitable for scripting.

Many (most?) of the features of 'csh' which do not affect scripting have been added to other shells. As I recall, command retrieval was a 'csh' feature, but is the norm with (e.g.) BASH.

Speaking of BASH, it has become *incredibly* popular. But for scripting, you rarely need BASH per se. Shell scripts should start with the magic introducer "#!/bin/sh". I've seen many colleagues coding "#!/bin/bash", but that makes your script less portable: you don't know that all systems where your script runs will even /have/ BASH, and it might not be at /bin/bash even where it is installed.
This is just one example.

/bin/sh is the safest, being a POSIX requirement. Anything else is not.

Other shells, like KSH or ZSH, same goes.
Unless you really need a feature of that specific shell, don't require it (as an artifact in your scripts). If you DO want/need a specific shell (or any interpreter), start it with "#!/usr/bin/env /thing/", where "/thing/" is the desired interpreter: bash, ksh, zsh, csh, tcsh, python, perl, rexx, tclsh.


-- R; <><



On 1/29/25 1:17 PM, Frank Swarbrick wrote:
Fromhttps://www.ibm.com/docs/en/zos/3.1.0?topic=shells-introduction-zos:
An introduction to the z/OS shells
There are two shells available for use on z/OS UNIX System Services:
The z/OS shell.

   *   The tcsh shell.

The z/OS shell is modeled after the UNIX System V shell with some of the 
features found in the Korn shell. As implemented for z/OS UNIX System Services, 
this shell conforms to POSIX standard 1003.2, which has been adopted as ISO/IEC 
International Standard 9945-2: 1992.
The tcsh shell is an enhanced but compatible version of csh, the Berkeley UNIX 
C shell. It is a command language interpreter that can be used as a login shell 
and as a shell script command processor.
---

In other words, the z/OS shell seems to be independently developed by IBM and 
is based on both the Unix System V shell and the Korn shell.

I think the fact that Korn and Kern are similar names is just coincidence.

________________________________
From: IBM Mainframe Discussion List<IBM-MAIN@LISTSERV.UA.EDU> on behalf of Rick 
Troth<0000058ff5c2d0a7-dmarc-requ...@listserv.ua.edu>
Sent: Monday, January 27, 2025 6:33 AM
To:IBM-MAIN@LISTSERV.UA.EDU <IBM-MAIN@LISTSERV.UA.EDU>
Subject: Re: OMVS

I don't recall if OMVS ever included the Korn shell. Haven't paid close
enough attention.

  >  (C) Copyright *Mortice Kern* Systems, Inc., 1985, 1996.

The Mortice Kern Toolkit (MKS Toolkit) was also available for Windoze in
those days, an excellent "front" on an otherwise non-POSIX system, very
similar to what CYGWIN does. I remember requesting MKS TK from my
management at the time, but since it's a charge-for product they always
wanted more justification than I could muster. Naturally I then landed
on CYGWIN which was somewhat of a toy until around 2005.

I was delighted to see MKS Toolkit as a significant part of OMVS because
I had seen and used it in the Microsoft world and it worked well there.

Never seen "Kern" apart from "Mortice", so I took "kern shell" to be a
typo for "korn shell".


-- R; <><




On 1/26/25 3:26 PM, Mike Schwab wrote:
IBM
Licensed Material - Property of IBM
5694-A01 Copyright IBM Corp. 1993, 2011
(C) Copyright *Mortice Kern* Systems, Inc., 1985, 1996.
(C) Copyright Software Development Group, University of Waterloo, 1989.

All Rights Reserved.

U.S. Government Users Restricted Rights
Use, duplication or disclosure restricted by
GSA ADP Schedule Contract with IBM Corp.

IBM is a registered trademark of the IBM Corp.


On Sun, Jan 26, 2025 at 12:51 PM Paul Gilmartin <
0000042bfe9c879d-dmarc-requ...@listserv.ua.edu> wrote:

On Sun, 26 Jan 2025 18:12:01 +0100, Radoslaw Skorupka  wrote:
     ...
How does Kern shell compare with Bourne shell and POSIX shell?

A quick Google search for "Kern shell" returns mostly pages about
psychology or thermal engineering.
Obvious typo. Was it funny?

More than I care to know about heat exchangers.

https://en.wikipedia.org/wiki/KornShell

And I doubt that I mistyped.  I copied "Kern shell" with mouse from
an earlier ply and pasted directly into the query string.

And there seems to be a passing reference in an IBM page:
<
https://www.ibm.com/docs/en/zos/3.1.0?topic=procedures-accessing-unix-system-services-zos-unix-shell
-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email tolists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
-- R; <><

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email tolists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email tolists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
-- R; <><

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to