I just realized I replied privately and not to the list on the below. D'oh!
-- Forwarded message --
From: Ben Scott
Date: Sun, Jun 24, 2012 at 9:49 PM
Subject: Re: Capturing file descriptor 3, or alternatives.
To: Bill Freeman
On Tue, Jun 19, 2012 at 4:34 PM, Bill Fr
On Tue, Jun 26, 2012 at 11:51 AM, Bill Freeman wrote:
> But I have to provide two different values, for four different
> environment variables to get the job done. I was thinking about how
> to pack two values into one table (displayed in the menu), and doing
> the splitting of stuff in bash ...
It seems as though Ben has a good approach (in the separate thread).
But to follow up on questions from others, let me be a bit more
detailed about the problem setting:
We deploy python based web-sites and web applications (Django, Twisted
or -- shudder --Plone) to various *nix servers. Could be
On Tue, Jun 26, 2012 at 8:01 AM, Ben Scott wrote:
> P.S. to the P.P.P.S.:
>
> On Tue, Jun 26, 2012 at 7:55 AM, Ben Scott wrote:
>> I kept trying this one-liner:
>>
>> ANSWER=$( ( dialog --output-fd 3 --inputbox 'Speak Friend and enter' 0
>> 0 > /dev/fd/4 ) 3>&1 4>&1 )
>
> This may make the red
P.S. to the P.P.P.S.:
On Tue, Jun 26, 2012 at 7:55 AM, Ben Scott wrote:
> I kept trying this one-liner:
>
> ANSWER=$( ( dialog --output-fd 3 --inputbox 'Speak Friend and enter' 0
> 0 > /dev/fd/4 ) 3>&1 4>&1 )
This may make the redirection I'm talking about clearer:
ANSWER=$( ( dialog --outp
P.P.P.S.:
On Tue, Jun 26, 2012 at 7:36 AM, Ben Scott wrote:
> http://pastebin.com/XdxWjpeU
Ah-ha! I think I just figured out why I need the exec builtin.
I kept trying this one-liner:
ANSWER=$( ( dialog --output-fd 3 --inputbox 'Speak Friend and enter' 0
0 > /dev/fd/4 ) 3>&1 4>&1 )
Th
On Mon, Jun 25, 2012 at 11:09 PM, Ben Scott wrote:
> On Tue, Jun 19, 2012 at 4:34 PM, Bill Freeman wrote:
>> What occurred to me is to send the final result to fd 3, which the
>> shell would have to have opened before forking. ...
>
> http://pastebin.com/RGBuRw0e
> It appears to work.
P.P.S.:
On Mon, Jun 25, 2012 at 11:09 PM, Ben Scott wrote:
>> What occurred to me is to send the final result to fd 3, which the
>> shell would have to have opened before forking. ...
>
> http://pastebin.com/RGBuRw0e
P.S.:
CAVEAT
I should prolly make it explicit that I don't understand everything
abo
On Tue, Jun 19, 2012 at 4:34 PM, Bill Freeman wrote:
> What occurred to me is to send the final result to fd 3, which the
> shell would have to have opened before forking. ... get bash(sh)
> to build a pipe (unnamed) to the child process's fd 3,
> and either exec that (when it comes) or stuff it i
Ben Scott writes:
>
> On Mon, Jun 25, 2012 at 9:13 AM, Kevin D. Clark
> wrote:
> > I think that a lot of effort could be put into solving this problem
> > with these constraints...or...the problem could be solved simply with
> > a small temporary file that parent+child agreed to use.
> ...
> > I'
On Mon, Jun 25, 2012 at 9:13 AM, Kevin D. Clark
wrote:
> I think that a lot of effort could be put into solving this problem
> with these constraints...or...the problem could be solved simply with
> a small temporary file that parent+child agreed to use.
...
> I'm a big fan of "simple".
I am, t
I've thought about this problem during my commute for a week now, and
I haven't been able to come up with a simple solution that satisfies
the constraints.
I think that a lot of effort could be put into solving this problem
with these constraints...or...the problem could be solved simply with
a s
On Thu, Jun 21, 2012 at 5:20 PM, Bill Freeman wrote:
>> I was suggesting the possibility that an existing tool might
>> help you by somehow interacting with the user via some channel
>>> other than stdout and then uttering the results back to the
>>> parent shell via stdout,
>
> Ah, well, there is
Bill Freeman writes:
>
> I'm not following. Perhaps I just don't understand process
> substitution. Just in case I'm being misheard, let me try again.
Yeah, I think I didn't understand exactly what you wanted to do.
So..., what you want is for the parent shell to end up just making
a call to p
On Thu, Jun 21, 2012 at 8:43 AM, Michael ODonnell
wrote:
>
>
>> What I haven't figured out is how to return the results to the
>> parent shell. Not because I can't write it somewhere other
>> than the tty, but because I don't know how to get the shell to
>> hook up a pipe to that extra fd, to whi
> What I haven't figured out is how to return the results to the
> parent shell. Not because I can't write it somewhere other
> than the tty, but because I don't know how to get the shell to
> hook up a pipe to that extra fd, to which I can write, and from
> which the shell can later read (while
The several of these I've looked into (duck-duck-go is having a hard time
finding some of them) solve a problem that I don't have, writing the UI.
Some are inappropriate even for that, since they must interface using
the tty that their parent process (shell) is using, not some X server not
availab
Whiptail. Is that a Harry Potter character?
On Tue, Jun 19, 2012 at 4:47 PM, Michael ODonnell
wrote:
>
>
> Is something like whiptail ruled out?
>
> ___
> gnhlug-discuss mailing list
> gnhlug-discuss@mail.gnhlug.org
> http://mail.gnhlug.org/mailman/lis
Here is a more complete list of candidates some of which may
handle the fd gymnastics in question for you and then simply
utter the desired results on their stdout:
Python:
python-dialog - Python module for making Text/Console-mode user interfaces
Text:
dialog- Displays user-friendly
Two thoughts:
* Use Bash's `process substitution' syntax: "<(...)" and/or ">(...)"
to pass the auxiliary process' stdin and/or stdout fd as an argument.
If you don't want to have two script-files rather than one, then
you may have to do something like...:
bash -c '
Is something like whiptail ruled out?
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
I really hate string processing in bash. So I'd like to write a
script in another language that 1. interacts with the user; 2.
calculates the desired values of some environment variables; and 3.
communicates those settings to the shell from which it was invoked
(since the environment variables are
22 matches
Mail list logo