public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Ehud Karni" <ehud@unix.mvs.co.il>
To: ebb9@byu.net
Cc: cygwin@cygwin.com, steve.rainbird@mssint.com
Subject: Re: Unusual environemtal variables
Date: Sun, 21 Dec 2008 16:07:00 -0000	[thread overview]
Message-ID: <200812211606.mBLG6LX2014401@beta.mvs.co.il> (raw)
In-Reply-To: <494BA56A.7070009@byu.net> (message from Eric Blake on Fri, 19 	Dec 2008 06:45:14 -0700)

On Fri, 19 Dec 2008 06:45:14 -0700, Eric Blake <ebb9@byu.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

--
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/

  reply	other threads:[~2008-12-21 16:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-19  9:23 Steve Rainbird
2008-12-19 13:46 ` Eric Blake
2008-12-21 16:07   ` Ehud Karni [this message]
2008-12-21 19:44     ` Steve Rainbird
2008-12-22 15:20     ` Mark J. Reed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200812211606.mBLG6LX2014401@beta.mvs.co.il \
    --to=ehud@unix.mvs.co.il \
    --cc=cygwin@cygwin.com \
    --cc=ebb9@byu.net \
    --cc=steve.rainbird@mssint.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).