Re: (sh/bash) How to check for a string matching -*?



Janis Papanagnou wrote:

This is especially interesting; I thought ksh88 was POSIX conformant,
but it did not support /!/. Had that been a later addition to POSIX?

The POSIX shell description was based on ksh88 but with some
modifications. Obviously the original ksh88 did not implement
those modifications, so it was not POSIX conformant. Systems that
use ksh88 as their POSIX shell had to modify it to be conformant.

Later versions of ksh88 added the "missing" POSIX features such
as ! and $((...)), but are still not conformant in some ways.
That's why /usr/xpg4/bin/sh and /bin/ksh are different binaries
in Solaris 10.

One difference that springs to mind is:

$ ksh -c 'echo $((010))'
10
$ sh -c 'echo $((010))'
8

--
Geoff Clare <netnews@xxxxxxxxxxxxx>

.



Relevant Pages

  • Re: How to fetch the function name?
    ... With posix, some vendors spun a posix shell off ksh88, subtracting ... I couldn't find any simple rule for ksh88 yet. ... This ksh88-c goes back from current HP-UX releases at least to HP-UX 8. ...
    (comp.unix.shell)
  • Re: How to fetch the function name?
    ... With the original ksh88, $0 in a function held the function name. ... With posix, some vendors spun a posix shell off ksh88, subtracting ... maintained a very old non-posix ksh for years. ...
    (comp.unix.shell)
  • Re: negate if condition
    ... :>>>Ksh88 which claims to be POSIX compliant does not support it. ... much point writing ksh scripts anyway. ...
    (comp.unix.shell)
  • Re: difference between -e and -f option in "if statement" in korn
    ... Most versions of ksh88 will have -e as well as it's POSIX. ... And the file may exist at the time the "[" command is ... (that is rely on the error of do-something). ...
    (comp.unix.shell)
  • Re: shell scripting with solaris, help.
    ... PATH as argument should output the PATH where to get the POSIX ... Solaris that are not POSIX conformant by default, ... but NOT necessarily one that gives you a POSIX shell. ... > and are sometimes Bourne shell variants, ...
    (comp.unix.solaris)