Inconsistent quote and escape handling in substitution part of parameter expansions.

2012-02-28 Thread lhunath
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: darwin11.2.0 Compiler: /Developer/usr/bin/clang Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='darwin11.2.0' -DCONF_MACHTYPE='i386-apple-darwin11.2.0' -DCONF_VENDOR='apple' -DLOCALED

Print non-readonly variables with declare +r -p

2011-12-13 Thread lhunath
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: darwin11.2.0 Compiler: /Developer/usr/bin/clang Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='darwin11.2.0' -DCONF_MACHTYPE='i386-apple-darwin11.2.0' -DCONF_VENDOR='apple' -DLOCALED

Typo in HISTORY EXPANSION section

2011-12-01 Thread lhunath
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: darwin11.2.0 Compiler: /Developer/usr/bin/clang Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='darwin11.2.0' -DCONF_MACHTYPE='i386-apple-darwin11.2.0' -DCONF_VENDOR='apple' -DLOCALED

Negative indexes in ${arr[@]:off:length}

2011-06-25 Thread lhunath
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: darwin10.7.1 Compiler: /usr/bin/gcc-4.2 Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='darwin10.7.1' -DCONF_MACHTYPE='i386-apple-darwin10.7.1' -DCONF_VENDOR='apple' -DLOCALEDIR='/opt

!(*/) should expand to all non-directory files in a directory.

2011-06-25 Thread lhunath
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: darwin10.7.1 Compiler: /usr/bin/gcc-4.2 Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='darwin10.7.1' -DCONF_MACHTYPE='i386-apple-darwin10.7.1' -DCONF_VENDOR='apple' -DLOCALEDIR='/opt

Re: IFS handling and read

2009-11-30 Thread Lhunath (Maarten B.)
On 30 Nov 2009, at 16:15, Chet Ramey wrote: > > Lhunath (Maarten B.) wrote: > >> Note that 'read' is a bash feature; not a POSIX shell feature. In that >> sense, "read" alone is limiting your "portability". So portability in the >>

Re: IFS handling and read

2009-11-30 Thread Lhunath (Maarten B.)
On 30 Nov 2009, at 15:56, Chris F.A. Johnson wrote: > > On Mon, 30 Nov 2009, Greg Wooledge wrote: > >> On Mon, Nov 30, 2009 at 11:46:03AM +0100, Lhunath (Maarten B.) wrote: >>> Don't use pipelines to send streams to read. Use file redirection instead: >>>

Re: IFS handling and read

2009-11-30 Thread Lhunath (Maarten B.)
On 30 Nov 2009, at 14:10, Marc Herbert wrote: > > Lhunath (Maarten B.) a écrit : >> On 30 Nov 2009, at 11:34, Marc Herbert wrote: >> >>> Eric Blake a écrit : >>>> This is E4 in the FAQ: >>>> ftp://ftp.cwru.edu/pub/bash/FAQ > >> Inste

Re: operators available in bash versions

2009-11-30 Thread Lhunath (Maarten B.)
On 30 Nov 2009, at 12:12, Gerard wrote: > > I apologize for asking what is probably a dumb question, but where can > I find a definitive listing of what features are available in each > version of Bash. > > For example, I only have access to Bash-4 on my system. I need to know > if " $(< " also

Re: IFS handling and read

2009-11-30 Thread Lhunath (Maarten B.)
On 30 Nov 2009, at 11:34, Marc Herbert wrote: > Eric Blake a écrit : >> >> This is E4 in the FAQ: >> ftp://ftp.cwru.edu/pub/bash/FAQ >> >> POSIX permits, but does not require, that the final element of a pipeline >> be executed in a subshell. Bash uses the subshell, ksh does not. >> Variable as

Re: printf "%q" and $'...'

2009-11-25 Thread Lhunath (Maarten B.)
On 25 Nov 2009, at 16:27, Antonio Macchi wrote: >> imadev:~$ echo $'foo\0bar' >> foo > > > sorry... I'm a little bit confusing... look > > $ echo foo$'\0'bar > foobar > I expect $'\0' expands to the C-string ''. Which then gets added to the argument after 'foo' and before 'bar'.

Re: printf "%q" and $'...'

2009-11-25 Thread Lhunath (Maarten Billemont)
On 25 Nov 2009, at 14:58, Antonio Macchi wrote: > my goal is very very stupid, like this > > $ printf "%q" $( > to get a "ascii form" of a binary file (something like uuencode) > > > but, as you can see, it does not work only for two binary chars > > 0x00, and 0x0a That doesn't sound like a