Re: Indirect expansion and arrays

2012-10-02 Thread Techlive Zheng
> On 7/29/10 4:55 PM, Bernd Eggink wrote: > > It seems that indirect expansion doesn't work with arrays: > > > > $ a=(x y z) > > $ b=a > > $ echo "${!b[0]} ${!b[1]} ${!b[2]}" > > x > > > > Is that intended? The documentation isn't explicit about it. > It does, but it doesn't work in the way yo

Re: `bash --debugger` in interactive mode

2012-08-19 Thread Techlive Zheng
2012/8/20 Chet Ramey : > On 8/18/12 1:55 AM, 郑文辉(Techlive Zheng) wrote: >> I happened to have `shopt -s extdebug` in my .bashrc recently. >> >> After a new bash session started, I got the following output. >> >> bash debugger, bashdb, release 4.2-0.8 >>

`bash --debugger` in interactive mode

2012-08-17 Thread Techlive Zheng
I happened to have `shopt -s extdebug` in my .bashrc recently. After a new bash session started, I got the following output. bash debugger, bashdb, release 4.2-0.8 Copyright 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Rocky Bernstein This is free software, covered by the GNU

Re: `history -r` can not read from /dev/stdin ?

2012-08-17 Thread Techlive Zheng
2012/8/17 郑文辉(Techlive Zheng) : > 2012/8/17 郑文辉(Techlive Zheng) : >> 2012/8/17 Chet Ramey : >>> On 8/16/12 10:11 PM, 郑文辉(Techlive Zheng) wrote: >>>> 2012/8/17 Chet Ramey : >>>>> On 8/16/12 9:17 AM, 郑文辉(Techlive Zheng) wrote: >>>>>>

Re: `history -r` can not read from /dev/stdin ?

2012-08-17 Thread Techlive Zheng
2012/8/17 郑文辉(Techlive Zheng) : > 2012/8/17 Chet Ramey : >> On 8/16/12 10:11 PM, 郑文辉(Techlive Zheng) wrote: >>> 2012/8/17 Chet Ramey : >>>> On 8/16/12 9:17 AM, 郑文辉(Techlive Zheng) wrote: >>>>> I was trying to reload the bash history file which c

Re: `history -r` can not read from /dev/stdin ?

2012-08-16 Thread Techlive Zheng
2012/8/17 Chet Ramey : > On 8/16/12 10:11 PM, 郑文辉(Techlive Zheng) wrote: >> 2012/8/17 Chet Ramey : >>> On 8/16/12 9:17 AM, 郑文辉(Techlive Zheng) wrote: >>>> I was trying to reload the bash history file which changed by another >>>> bash session with th

Re: `history -r` can not read from /dev/stdin ?

2012-08-16 Thread Techlive Zheng
2012/8/17 Chet Ramey : > On 8/16/12 9:17 AM, 郑文辉(Techlive Zheng) wrote: >> I was trying to reload the bash history file which changed by another >> bash session with the following commands, but it wouldn't work, please >> help me, why? >> >> ``` >> new_

`history -r` can not read from /dev/stdin ?

2012-08-16 Thread Techlive Zheng
I was trying to reload the bash history file which changed by another bash session with the following commands, but it wouldn't work, please help me, why? ``` new_history=$(history -a /dev/stdout) history -c history -r echo "$new_history" | history -r /dev/stdin ```