Re: output redirection with process substitution asynchronous?

2009-12-08 Thread Marc Herbert
DennisW wrote : > Would you care to comment on the coproc command in Bash 4? I wish I could, but I know nothing about it. Anyone else? pjodrr wrote : > But at least it became clear that the builtin process substitution is > not the solution for me. Wait! Maybe it is. I found a much nicer way to

Re: output redirection with process substitution asynchronous?

2009-12-08 Thread Marc Herbert
pk a écrit : > > I disagree. All the further changes in the requirements because creating a > subshell or being asynchronous is not acceptable etc. are not a goal in > themselves, but rather the indicators that he's trying to accomplish > something else. > I think he just want side-effects li

Re: output redirection with process substitution asynchronous?

2009-12-08 Thread pjodrr
On Dec 8, 11:05 am, Marc Herbert wrote: > pk a écrit : > > > > > I disagree. All the further changes in the requirements because creating a > > subshell or being asynchronous is not acceptable etc. are not a goal in > > themselves, but rather the indicators that he's trying to accomplish > > somet

Re: bash is not capable of comparing of strings and real numbers

2009-12-08 Thread Greg Wooledge
On Mon, Dec 07, 2009 at 05:08:02PM -0800, DennisW wrote: > Since printf understands floats (or acts like it does), you can use it > plus a little care and luck to do float comparisons in Bash: > [...] > $ printf -v a "%08.2f" $a > $ printf -v b "%08.2f" $b > $ [[ $a < $b ]] && echo true || echo fal

Re: output redirection with process substitution asynchronous?

2009-12-08 Thread pjodrr
On Dec 8, 10:55 am, Marc Herbert wrote: > DennisW wrote : > > > Would you care to comment on the coproc command in Bash 4? > > I wish I could, but I know nothing about it. Anyone else? yeah, I tried that: prefix_timestamp() { while read line; do echo "$(date): $line" done } copr

Re: bash is not capable of comparing of strings and real numbers

2009-12-08 Thread DennisW
On Dec 8, 7:11 am, Greg Wooledge wrote: > On Mon, Dec 07, 2009 at 05:08:02PM -0800, DennisW wrote: > > Since printf understands floats (or acts like it does), you can use it > > plus a little care and luck to do float comparisons in Bash: > > [...] > > $ printf -v a "%08.2f" $a > > $ printf -v b "

Command substitution reduce spaces even in strings

2009-12-08 Thread matez
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: i686-pc-linux-gnu-gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/loc

Re: Command substitution reduce spaces even in strings

2009-12-08 Thread Greg Wooledge
On Tue, Dec 08, 2009 at 02:01:23PM +0100, ma...@fiz15.jupiter.vein.hu wrote: > $ echo $(echo "'alfa beta'") > 'alfa beta' > > Instead of 'alfa beta' with double space. echo "$(echo "'alfa beta'")"

Re: Command substitution reduce spaces even in strings

2009-12-08 Thread Matias A. Fonzo
On Tue, 08 Dec 2009 14:01:23 +0100 ma...@fiz15.jupiter.vein.hu wrote: > Configuration Information [Automatically generated, do not change]: > Machine: i686 > OS: linux-gnu > Compiler: i686-pc-linux-gnu-gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' > -DCONF_OSTYPE='linux-gnu'

Re: Fullscreen & unchecking show menubar.

2009-12-08 Thread Bob Proulx
Rodney Varney III wrote: > I've noticed that if you full screen bash in a graphical > interface, and click "view" then uncheck menubar, you cannot escape > the terminal unless you type in exit. Kinda annoying when you are > doing something important in bash. With the background you listed I

Re: Command substitution reduce spaces even in strings

2009-12-08 Thread Ken Irving
On Tue, Dec 08, 2009 at 02:01:23PM +0100, ma...@fiz15.jupiter.vein.hu wrote: > Configuration Information [Automatically generated, do not change]: > Machine: i686 > OS: linux-gnu > Compiler: i686-pc-linux-gnu-gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' > -DCONF_OSTYPE='linux

Mixing exec redirection with explicit redirection, unexpected results

2009-12-08 Thread root
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPAC

Re: Mixing exec redirection with explicit redirection, unexpected results

2009-12-08 Thread John Reiser
#!/bin/bash > /tmp/foo exec 1>/tmp/foo echo a echo B>>/tmp/foo echo c echo D>>/tmp/foo echo e echo F>>/tmp/foo That script creates two simultaneous writers of /tmp/foo (one via the "exec >", another via each "echo >>") but does not provide any concurrency control. Shame on the script; the resu

Re: Mixing exec redirection with explicit redirection, unexpected results

2009-12-08 Thread Chet Ramey
r...@enterprise.herff-jones.com wrote: > When I use the 'exec' built-in to redirect standard output > for a script, and then also use explicit redirection on > other commands, pointing both to the same output file, > I get unpredictable (but repeatable) results with the