delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/12/21/14:44:09

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: "Steve Rainbird" <steve DOT rainbird AT mssint DOT com>
Subject: Re: Unusual environemtal variables
Date: Sun, 21 Dec 2008 19:42:46 -0000
Lines: 51
Message-ID: <gim67m$9mk$1@ger.gmane.org>
References: <gifp4m$u1t$1 AT ger DOT gmane DOT org> <494BA56A DOT 7070009 AT byu DOT net> <200812211606 DOT mBLG6LX2014401 AT beta DOT mvs DOT co DOT il>
Mime-Version: 1.0
In-Reply-To: <200812211606.mBLG6LX2014401@beta.mvs.co.il>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com


"Ehud Karni" <ehud AT unix DOT mvs DOT co DOT il> wrote in message 
news:200812211606 DOT mBLG6LX2014401 AT beta DOT mvs DOT co DOT il...
> On Fri, 19 Dec 2008 06:45:14 -0700, Eric Blake <ebb9 AT byu DOT net> wrote:
>>
>> According to Steve Rainbird on 12/19/2008 2:22 AM:
>> SR:> When i run a Fuijitsu Cobol program it requires environmental 
>> variables
>> SR:> starting with the @ sign.
>>
>> That is inherently non-portable.  POSIX states that "Other characters may
>> be permitted by an implementation; applications shall tolerate the
>> presence of such names," but does not require applications to be able to
>> create such names.
>>
>> http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08
>>
>> SR:>
>> SR:> Is there any way around this?
>>
>> You'll have to set it in Windows, prior to starting bash, as there is no
>> way to make bash create variables not starting with something from the
>> portable set [_a-zA-Z].
>
> This behavior (accepting names of only ASCII Alpha and _) is a bash self
> imposed limitation. If you use csh (or tcsh) names with other characters
> are supported too.
>
> So you can use csh's: setenv "@FOO" "value".
> You can also use the env command to bypass bash limitation like this:
>    exec env "@FOO=bar" exec /bin/bash -i
> Note the 2 `exec' if you do not want to spawn more processes.
>
> Ehud.
>
>
> --
> Ehud Karni           Tel: +972-3-7966-561  /"\
> Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
> Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
> http://www.mvs.co.il  FAX:  1-815-5509341  / \
> GnuPG: 98EA398D <http://www.keyserver.net/>    Better Safe Than Sorry
>


Thanks Eric and Ehud.

-- 
Steve 



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019