bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Intriguing error with arithmetic evaluation


From: Greg Wooledge
Subject: Re: Intriguing error with arithmetic evaluation
Date: Wed, 24 Aug 2016 12:05:49 -0400
User-agent: Mutt/1.4.2.3i

On Wed, Aug 24, 2016 at 03:01:09PM +0100, Stephane Chazelas wrote:
> Possibly HP-UX changed it? Sounds more likely than 
> Solaris changing it the other way round.
> 
> What version of ksh is it based on?

$ strings /bin/ksh | grep Version | tail -2
@(#)Version 11/16/88

(That command came from
http://unix.stackexchange.com/questions/199900/how-can-i-safely-get-the-version-of-ksh
 .)

$ what /bin/ksh
/bin/ksh:
         $Revision: 78.5.1.45 $
        Version 11/16/88
         PATCH_10_20: arith.o blok.o ctype.o defs.o edit.o echo.o expand.o 
fault.o io.o string.o stak.o word.o emacs.o vi.o hpux_rel.o args.o builtin.o 
cmd.o main.o msg.o print.o xec.o name.o macro.o error.o service.o test.o jobs.o 
history.o 99/10/18

For comparison, here's an HP-UX 11 machine:

$ uname -a
HP-UX megview1 B.11.11 U 9000/785 532302039 unlimited-user license
$ ksh -ec '((0)); echo X'
$ strings /bin/ksh | grep Version | tail -2
@(#)Version 11/16/88
$ what /bin/ksh
/bin/ksh:
         defs.c $Date: 2002/11/18 20:42:15 $Revision: r11.11/2 PATCH_11.11 
(PHCO_27019)
         edit.c $Date: 2003/12/04 01:58:17 $Revision: r11.11/4 PATCH_11.11 
(PHCO_30000)
         fault.c $Date: 2003/12/04 02:02:36 $Revision: r11.11/3 PATCH_11.11 
(PHCO_30000)
         io.c $Date: 2003/12/04 02:04:39 $Revision: r11.11/6 PATCH_11.11 
(PHCO_30000)
         emacs.c $Date: 2003/12/04 02:01:04 $Revision: r11.11/3 PATCH_11.11 
(PHCO_30000)
         vi.c $Date: 2003/12/04 02:06:52 $Revision: r11.11/2 PATCH_11.11 
(PHCO_30000)
         cmd.c $Date: 2002/11/18 20:41:14 $Revision: r11.11/1 PATCH_11.11 
(PHCO_27019)
         main.c $Date: 2002/11/18 20:52:03 $Revision: r11.11/4 PATCH_11.11 
(PHCO_27019)
         xec.c $Date: 2005/04/14 05:37:12 $Revision: r11.11/3 PATCH_11.11 
(PHCO_33169)
         macro.c $Date: 2005/04/14 05:37:36 $Revision: r11.11/3 PATCH_11.11 
(PHCO_33169)
         error.c $Date: 2002/11/18 20:44:16 $Revision: r11.11/2 PATCH_11.11 
(PHCO_27019)
         jobs.c $Date: 2005/04/14 05:36:32 $Revision: r11.11/5 PATCH_11.11 
(PHCO_33169)
         growaray.c $Date: 2004/07/08 23:31:31 $Revision: r11.11/1 PATCH_11.11 
(PHCO_30316)
         unassign.c $Date: 2006/02/15 01:44:30 $Revision: r11.11/2 PATCH_11.11 
(PHCO_34509)
         $Revision: @(#) ksh88 R11.11_BL2006_0620_1 PATCH_11.11 PHCO_34509 
         $ B.11.11_LR  Nov  4 2004 06:32:21 $ 
        Version 11/16/88

I won't even try to guess which behavior (HP's or Sun's) is the original
and which one is a vendor modification.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]