From owner-freebsd-bugs Fri Mar 1 02:50:57 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id CAA03790 for bugs-outgoing; Fri, 1 Mar 1996 02:50:57 -0800 (PST) Received: from Sysiphos (Sysiphos.MI.Uni-Koeln.DE [134.95.212.10]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id CAA03760 for ; Fri, 1 Mar 1996 02:50:11 -0800 (PST) Received: by Sysiphos id AA19051 (5.67b/IDA-1.5 for bugs@freebsd.org); Fri, 1 Mar 1996 11:46:07 +0100 Message-Id: <199603011046.AA19051@Sysiphos> From: se@zpr.uni-koeln.de (Stefan Esser) Date: Fri, 1 Mar 1996 11:46:06 +0100 In-Reply-To: tege@matematik.su.se "bin/1052: /bin/sh problem with new GCC (snapshot for 2.8)" (Feb 29, 23:27) X-Mailer: Mail User's Shell (7.2.6 alpha(2) 7/9/95) To: tege@noisy.matematik.su.se Subject: Re: bin/1052: /bin/sh problem with new GCC (snapshot for 2.8) Cc: bugs@freebsd.org Sender: owner-bugs@freebsd.org Precedence: bulk On Feb 29, 23:27, tege@matematik.su.se wrote: } Subject: bin/1052: /bin/sh problem with new GCC (snapshot for 2.8) } } >Number: 1052 } >Category: bin } >Synopsis: /bin/sh problem with new GCC (snapshot for 2.8) } >Confidential: no } >Severity: serious } >Priority: low } >Responsible: freebsd-bugs } >State: open } >Class: sw-bug } >Submitter-Id: current-users } >Arrival-Date: Thu Feb 29 14:40:03 PST 1996 } >Last-Modified: } >Originator: Torbjorn Granlund } >Organization: } TMG Datakonsult } >Release: FreeBSD 2.1-STABLE i386 } >Environment: } Hardly relevant. } } >Description: } } The /bin/sh of FreeBSD doesn't work as on other systems, or like bash. } The problem seems to be with the builtin `eval'. } } >How-To-Repeat: } } bash$ foo=tomte; var=foo; echo `eval echo \\$$var` } tomte } sh$ foo=tomte; var=foo; echo `eval echo \\$$var` } 5578var } } >Fix: } } I don't know of any fix that is compatible with a non-flawed sh. A fix } would be desirable if you want your users that install GCC 2.8 to avoid } problems. Just imagine the flood of bug reports that you will get... } } If you provide me with a (reasonable) fix, I will put it in to the gcc } repository in time for 2.8. How about: sh$ foo=tomte; var=foo; echo `eval echo \$"$var"` (Tested under BASH, too ...) Regards, STefan -- Stefan Esser, Zentrum fuer Paralleles Rechnen Tel: +49 221 4706021 Universitaet zu Koeln, Weyertal 80, 50931 Koeln FAX: +49 221 4705160 ============================================================================== http://www.zpr.uni-koeln.de/~se