Re: Hightlighting in bash

2011-03-12 Thread Derek Fawcus
On Thu, Mar 10, 2011 at 11:53:22AM -0800, Micah Cowan wrote: > > It wouldn't be difficult to write as a separate program, which is really > how this should be handled. You could redirect a pipeline's STDOUT and > STDERR to individual named pipes (FIFOs), and have a separate program > read from bot

Negative array subscript with unset

2011-03-12 Thread Chris F.A. Johnson
I all versions I have tried, unsetting an array element using a negative index fails: $ array=( q w e r t y ) $ unset 'array[-1]' bash: [-1]: bad array subscript -- Chris F.A. Johnson, Author: Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apre

Re: Negative array subscript with unset

2011-03-12 Thread Dennis Williamson
On Sat, Mar 12, 2011 at 6:21 PM, Chris F.A. Johnson wrote: > >  I all versions I have tried, unsetting an array element using a >  negative index fails: > > $ array=( q w e r t y ) > $ unset 'array[-1]' > bash: [-1]: bad array subscript > > > -- >   Chris F.A. Johnson, >  

Re: Negative array subscript with unset

2011-03-12 Thread Chet Ramey
On 3/12/11 7:21 PM, Chris F.A. Johnson wrote: > > I all versions I have tried, unsetting an array element using a > negative index fails: > > $ array=( q w e r t y ) > $ unset 'array[-1]' > bash: [-1]: bad array subscript Negative subscripts only work with ${parameter[subscript]}. The probl