Fatal bug with redirection

2006-10-04 Thread Yang
On my FC5 box, when I try certain things in bash 3.1.7(1)-release involving redirection, such as the following, bash crashes (immediately exits): { echo a >&3 ; } 3> >( echo b ) I've only tried this from an interactive shell. Unfortunately I don't have bashbug or bashversion, as I'm using the FC

Interactive commands cant be backgrounded if run from bashrc

2021-09-01 Thread C. Yang
From: cheshire (he...@cheryllium.com) To: mailto:bug-bash@gnu.org Subject: Interactive commands cant be backgrounded if run from bashrc   Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -fdebug-prefi

Re: Interactive commands cant be backgrounded if run from bashrc

2021-09-02 Thread C. Yang
iate further clarifications if I've misunderstood. Respectfully, Cheshire "When face to face with a difficulty, you are up against a discovery." - Lord Kelvin On Thu, 02 Sep 2021 10:25:15 -0400 Chet Ramey wrote On 9/1/21 2:10 PM, C. Yang wrote: > M

Re: Interactive commands cant be backgrounded if run from bashrc

2021-09-02 Thread C. Yang
Chet Ramey wrote On 9/2/21 12:15 PM, C. Yang wrote: > However, is it possible that there may be further unexpected consequences, > since bash is still waiting to complete initialization this entire time? > > For instance, if I stop and background emacs, then I find myself b

Re: Interactive commands cant be backgrounded if run from bashrc

2021-09-02 Thread C. Yang
Ah, I understand it now. Thanks for explaining it to me so patiently. This also means my issue is resolved. Thank you all again for your help!Best, Cheshire On Thu, 02 Sep 2021 18:44:36 -0400 Chet Ramey wrote On 9/2/21 5:06 PM, C. Yang wrote: > Co

Re: invoke tilde expansion on quoted string

2011-12-11 Thread Yang Chengwei
On Sat, Nov 12, 2011 at 01:42:16PM +0800, Peng Yu wrote: > Hi, > > I know from the document that tilde expansion only works if the string > is unquoted (see below) > > ~$ cd '~/..' > -bash: cd: ~/..: No such file or directory > ~$ cd ~/.. > /Users$ > > I'm wondering if I already have a string va

Quick question: mv !(file) !$

2009-01-08 Thread Yang Zhang
Hi, why doesn't the second command work? (Trying to move all files into a newly created directory.) $ mkdir dhclient $ mv !(dhclient) !$ bash: !: event not found -- Yang Zhang http://www.mit.edu/~y_z/

Re: Quick question: mv !(file) !$

2009-01-13 Thread Yang Zhang
Chet Ramey wrote: Yang Zhang wrote: Hi, why doesn't the second command work? (Trying to move all files into a newly created directory.) $ mkdir dhclient $ mv !(dhclient) !$ bash: !: event not found It doesn't work because enabling the `extglob' option doesn't cause bash

"$@" vs. nounset

2009-06-29 Thread Yang Zhang
variables set to empty arrays and unset variables are the same). As a result I'm forced to use "${@:-}" or something like that everywhere I use "$@" (which is really everywhere). Is there any other way around this? Any way to get a more selective nounset? Thanks in advance. -- Yang Zhang http://www.mit.edu/~y_z/

Re: "$@" vs. nounset

2009-06-29 Thread Yang Zhang
Mike Frysinger wrote: On Monday 29 June 2009 04:54:52 Yang Zhang wrote: Hi, I like using nounset for stricter scripts, but an annoyance is that anytime I use "$@" and it's empty, I get an error, when (to me, cognitively) it is not "unset" (as in someone *forgot* to se

Assigning to multiple variables on same line

2009-08-10 Thread Yang Zhang
Why does assigning to multiple variables on the same line exhibit sequential consistency normally but not for local variables? #!/usr/bin/env bash f() { local a=$1 b=$a c=0 d=$c echo $b echo $d } f x # Output: # b= # d=0 -- Yang Zhang http://www.mit.edu/~y_z/