Re: "RUN" command on Windows

Mike Aubury <[email protected]>
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <CAGAq4WEV-EFf+Dmy0JncavYCh+pm7NCSgENy-v6MVMLWD15v-A@mail.gmail.com>
Yep - because when you run them via MingW - you're using a 'bash'.
When you run the Aubit4GL compiled executable - you've not got that any
more.
(Thats not to say you couldnt put things in a .sh script file - then run
bash /somefile etc etc)

You could probably also hack the Aubit4GL library to kick off "bash" when
it does the run - but it wouldn't work unless you had bash installed - and
that's not a requirement for running Aubit4GL on windows so it wouldnt be
right to have it as the normal RUN action...

Thats one of the beautiful things about opensource :)

On 12 February 2015 at 09:13, Malcolm Perrior <
[email protected]> wrote:

>  Ha! Yup, put me in a room with Bill Gates for half an hour….
>
> Thing is, I can issue those commands on the MinGW command line and they
> behave as expected (e.g. $WORK expands correctly and %WORK% doesn’t), it’s
> just when using them via the RUN command within a compiled 4GL they play
> up.
>
> The concatentation method Daniel suggests works fine, it’s just that some
> commands are built up over a couple or more stages so it can get tedious
> doing all the necessary steps.
>
>
>
> Thanks all
>
>
>
> *From:* [email protected] [mailto:[email protected]] *On Behalf
> Of *Mike Aubury
> *Sent:* 11 February 2015 18:26
> *To:* Malcolm Perrior
> *Cc:* [email protected]
> *Subject:* Re: [Aubit4gl-discuss] "RUN" command on Windows
>
>
>
> Run is only behaving oddly - because you're expecting it to run on windows
> like it does on Unix..
>
>
>
> $WORK is a UNIX "sh"/"bash" environment variable expansion
>
> "pwd; cd /somewhere"
>
>
>
> are 2 commands - separated by the "sh"/"bash" command separator
>
>
>
> The Unix "sh"/"bash" is taking care of both of these - and thats not on
> your windows machine :)
>
>
>
>
> As Daniel says - you'll need to do these in a windows way - %WORK% might
> do it - or fgl_getenv("WORK"),"/"... etc definitely should.
>
>
>
> For the "pwd ; cd /opt; pwd" - you'll probably need to put that into a
> batch (.bat) file - and execute the batch file..
>
>
>
>
>
> Welcome to the wonderful world of windows....
>
>
>
>
>
>
>
>
>
> On 11 February 2015 at 16:37, Malcolm Perrior <
> [email protected]> wrote:
>
> Hi
>
>
>
> Has anyone used the 4GL “RUN” command within Windows (I’m using TUI mode
> via MinGW) and come across the following issues?
>
>
>
> 1)   Several commands on a line won’t parse –
>
> e.g. a 4GL with the following snippet:
>
> LET lc_cmd = “pwd ; cd /opt; pwd”
>
> RUN lc_cmd
>
> Returns the following at runtime (running in path /test):
>
> pwd: ignoring non-option arguments
>
> /Test
>
>
>
> Whatever sequence of commands I put in there , only the first one is
> parsed and run, the rest are ignored
>
>
>
> 2)   Shell variables are not expanded (or recognised?).
>
> e.g. set and export shell variable
>
> WORK=/test/programs
>
> and then run a 4GL with the following snippet:
>
>
>
>             LET lc_cmd = “$WORK/myprog.4ge”
>
>      RUN lc_cmd
>
>
>
> Returns the following at runtime:
>
>             ‘$WORK’ is not recognised as an internal or external command,
> operable program or batch file
>
>
>
> I’ve tried using the string ${WORK} in the 4GL with the same result.
>
>
>
> Seems RUN behaves oddly on Windows; any ideas if there are workarounds?
>
> Ta
>
>
> **********************************************************************
> The information contained in this email is intended only for the
> individual or entity to whom it is addressed. It may contain privileged and
> confidential information and if you are not an intended recipient you must
> not copy, distribute or take any action in reliance on it. If you have
> received this email in error, please notify us immediately by telephone on
> (020) 8628 3456. Please also destroy and delete the message from your
> computer.
>
> Any opinions expressed in this message are those of the sender only and do
> not necessarily represent the views of Foresters. The sender may not be
> authorised to give financial advice and nothing in this message should be
> construed as offering such advice or entering into any contract on behalf
> of any Foresters Company.
>
> Forester Life Limited is authorised by the Prudential Regulation Authority
> and regulated by the Financial Conduct Authority and Prudential Regulation
> Authority.
>
> Forester Fund Management Limited is authorised and regulated by the
> Financial Conduct Authority. The Children’s Mutual is a trading name of
> Forester Fund Management Ltd.
>
> Companies within the Foresters UK Group are registered in England as
> follows:
> Forester Life Limited 2997655, Forester Fund Management Limited 4315370
> and Forester Holdings (Europe) Limited 3013082.
>
> Registered Offices for all companies within the Foresters UK Group:
> Foresters House, 2 Cromwell Avenue, Bromley, BR2 9BF. T 020 8628 3400. F
> 020 8628 3500. E [email protected] foresters.com
> **********************************************************************
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Aubit4gl-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
>
>
>
>
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Claranet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.claranet.co.uk
> ________________________________________________________________________
>
> **********************************************************************
> The information contained in this email is intended only for the
> individual or entity to whom it is addressed. It may contain privileged and
> confidential information and if you are not an intended recipient you must
> not copy, distribute or take any action in reliance on it. If you have
> received this email in error, please notify us immediately by telephone on
> (020) 8628 3456. Please also destroy and delete the message from your
> computer.
>
> Any opinions expressed in this message are those of the sender only and do
> not necessarily represent the views of Foresters. The sender may not be
> authorised to give financial advice and nothing in this message should be
> construed as offering such advice or entering into any contract on behalf
> of any Foresters Company.
>
> Forester Life Limited is authorised by the Prudential Regulation Authority
> and regulated by the Financial Conduct Authority and Prudential Regulation
> Authority.
>
> Forester Fund Management Limited is authorised and regulated by the
> Financial Conduct Authority. The Children’s Mutual is a trading name of
> Forester Fund Management Ltd.
>
> Companies within the Foresters UK Group are registered in England as
> follows:
> Forester Life Limited 2997655, Forester Fund Management Limited 4315370
> and Forester Holdings (Europe) Limited 3013082.
>
> Registered Offices for all companies within the Foresters UK Group:
> Foresters House, 2 Cromwell Avenue, Bromley, BR2 9BF. T 020 8628 3400. F
> 020 8628 3500. E [email protected] foresters.com
> **********************************************************************
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Aubit4gl-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
>
>

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/

_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.