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

Bug#88653: marked as done (pdksh: `case' inside of `$( )' command substitution gives syntax error)



Your message dated Wed, 27 Jun 2012 10:58:33 +0000 (UTC)
with message-id <Pine.BSM.4.64L.1206271057500.3110@herc.mirbsd.org>
and subject line pdksh: �case' inside of �$( )' command substitution gives syntax error
has caused the Debian Bug report #88653,
regarding pdksh: `case' inside of `$( )' command substitution gives syntax error
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
88653: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=88653
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: pdksh
Version: 5.2.14-3
Severity: normal

Hi,

The following typescript shows that pdksh reports a syntax error
for a `case' statement inside of the `$( )' form of command
substitution.  I looked at the SUSv2 docs, and according to my
reading, this should be a legal shell construct.

Both ash and ksh93 handle this correctly, while bash and pdksh do
not.  Also note that the same `case' inside of either the old
style (back-quoted) command substitution or inside of a sub-shell
`( )' _is_ handled correctly by pdksh.

Note too that if the case selector has the leading (optional) `(',
then pdksh will handle the otherwise same `case' correctly.

Here are some notes regarding the typescript,

    1. !137 - pdksh gives syntax error, new style $( ).
    2. !138 - ok with (2) case selector, new style $( ).
    3. !139 - ok with  2) case selector, old style ` `.
    4. !140 - ok with  2) case selector, sub-shell ( ).
    5. !141 - ok with (2) case selector, sub-shell ( ).

Here is the typescript itself,

    137 jeff ~ $ do_shells 'aa=$( case 1 in 2) ;; esac )'
    ========================================================================
    >> aa=$( case 1 in 2) ;; esac ) <<
    sh: line 1: syntax error near unexpected token `;'
    sh: line 1: `aa=$( case 1 in 2) ;; esac )'
    -- sh -- exit status 2
    -- ash --
    bash: line 1: syntax error near unexpected token `;'
    bash: line 1: `aa=$( case 1 in 2) ;; esac )'
    -- bash -- exit status 2
    pdksh: <stdin>[1]: syntax error: `;;' unexpected
    -- pdksh -- exit status 1
    -- ksh93 --

    138 jeff ~ $ do_shells 'aa=$( case 1 in (2) ;; esac )'
    ========================================================================
    >> aa=$( case 1 in (2) ;; esac ) <<
    -- sh --
    -- ash --
    -- bash --
    -- pdksh --
    -- ksh93 --

    139 jeff ~ $ do_shells 'aa=` case 1 in 2) ;; esac `'
    ========================================================================
    >> aa=` case 1 in 2) ;; esac ` <<
    -- sh --
    -- ash --
    -- bash --
    -- pdksh --
    -- ksh93 --

    140 jeff ~ $ do_shells '( case 1 in 2) ;; esac )'
    ========================================================================
    >> ( case 1 in 2) ;; esac ) <<
    -- sh --
    -- ash --
    -- bash --
    -- pdksh --
    -- ksh93 --

    141 jeff ~ $ do_shells '( case 1 in (2) ;; esac )'
    ========================================================================
    >> ( case 1 in (2) ;; esac ) <<
    -- sh --
    -- ash --
    -- bash --
    -- pdksh --
    -- ksh93 --

Thanks,
-- 
Jeff Sheinberg  <jeffsh@erols.com>


-- System Information
Debian Release: woody/testing
Kernel Version: Linux eden-hda7.my.local 2.2.18 #2 Wed Feb 7 08:10:35 EST 2001 i586 unknown

Versions of the packages pdksh depends on:
ii  libc6          2.2.2-1        GNU C Library: Shared libraries and Timezone


--- End Message ---
--- Begin Message ---
Hi,

this is fixed with the pdksh → mksh migration.

bye,
//mirabilos
-- 
13:37⎜«Natureshadow» Deep inside, I hate mirabilos. I mean, he's a good
guy. But he's always right! In every fsckin' situation, he's right. Even
with his deeply perverted taste in software and borked ambition towards
broken OSes - in the end, he's damn right about it :(! […] works in mksh


--- End Message ---

Reply to: