Following up on shell(locale) problem
warren at warrensweb.us
Tue Mar 1 16:26:02 CST 2011
On Tue, 2011-03-01 at 15:13 -0700, Mike Bonner wrote:
> oh. If lc uses sh not bash, might need to parse whatever the default shell
> resource file is for the LANG string, at which point you could manually set
> it before calling locale. I don't recall if sh and bash are similar enough
> to eat the same file.
> On Tue, Mar 1, 2011 at 3:10 PM, Mike Bonner <bonnmike at gmail.com> wrote:
> > If theres a .bashrc file, or .. well I forget what its name is supposed to
> > be, you might try
> > shell("source path/to/my/.bashrc; locale -k LC_NUMERIC")
> > Basically, find the file that bash loads, source it to force to be
> > processed, and then tack your command onto the end.
> > On Tue, Mar 1, 2011 at 2:54 PM, Peter Haworth <pete at mollysrevenge.com>wrote:
> >> Thanks Warren. I just used the message box on my Mac and got the same
> >> (incorrect) output too. It's good to know if works under Linux though
> >> because that makes me think it's an LC bug even more.
> >> I'm currently researching if there's a way to get this info using
> >> Applescript (without issuing a shell command I mean) as a means to work
> >> around the problem.
> >> Pete Haworth
> >> On Mar 1, 2011, at 1:42 PM, Warren Samples wrote:
> >> > Hi Peter,
> >> >
> >> > Doing 'put shell("locale -k LC_NUMERIC")' in the message box returns the
> >> > same (expected) result for me here, running Linux, as I get in a
> >> > terminal. Same for putting the result into a field. I do get the same
> >> > unexpected behavior as you under OS X, however. I know this doesn't help
> >> > you solve you problem, but at may help isolate whatever bug it is that's
> >> > causing it.
> >> >
> >> > Good Luck,
> >> >
> >> > Warren
"Which shell" doesn't seem to be the problem. 'locale' returns the same
result regardless of the shell it's called from. Tried it in 'csh',
'zsh', 'bash' and sh. 'sh' and '/bin/sh' seem to just be aliases for
bash under OS X, at any rate. Is that not correct?
More information about the use-livecode