Re: (feature request) here-document, but from a file

2005-07-02 Thread Chet Ramey
Chris F.A. Johnson wrote: > On Sat, 2 Jul 2005, William Park wrote: > >> Dear Chet, >> >> It would be nice if I can read a file and process it as though it was >> here-document text in the script. Mainly, I want variable substitution, >> without calling lots of 'sed'. >> >> In Python, you would d

Re: (feature request) here-document, but from a file

2005-07-02 Thread William Park
On Sat, Jul 02, 2005 at 05:48:40PM -0600, Bob Proulx wrote: > Chris F.A. Johnson wrote: > > William Park wrote: > > >It would be nice if I can read a file and process it as though it was > > >here-document text in the script. Mainly, I want variable substitution, > > >without calling lots of 'sed'

Re: (feature request) here-document, but from a file

2005-07-02 Thread Paul Jarc
William Park <[EMAIL PROTECTED]> wrote: > It would be nice if I can read a file and process it as though it was > here-document text in the script. Mainly, I want variable substitution, > without calling lots of 'sed'. eval "blah

Re: (feature request) here-document, but from a file

2005-07-02 Thread Bob Proulx
Chris F.A. Johnson wrote: > William Park wrote: > >It would be nice if I can read a file and process it as though it was > >here-document text in the script. Mainly, I want variable substitution, > >without calling lots of 'sed'. > > > >In Python, you would do > > print "..." % ... > > > >So, pe

Re: (feature request) here-document, but from a file

2005-07-02 Thread Chris F.A. Johnson
On Sat, 2 Jul 2005, William Park wrote: Dear Chet, It would be nice if I can read a file and process it as though it was here-document text in the script. Mainly, I want variable substitution, without calling lots of 'sed'. In Python, you would do print "..." % ... So, perhaps, you can us

(feature request) here-document, but from a file

2005-07-02 Thread William Park
Dear Chet, It would be nice if I can read a file and process it as though it was here-document text in the script. Mainly, I want variable substitution, without calling lots of 'sed'. In Python, you would do print "..." % ... So, perhaps, you can use syntax like cat <<+ file cat <<<

declare -f and for (( ... ))

2005-07-02 Thread Thorsten Dahlheimer
Configuration Information [Automatically generated, do not change]: Machine: i586 OS: cygwin Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i586' -DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='i586-pc-cygwin' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/ locale' -DPACKAGE='bash' -

Expansions in arithmetic commands and subscripts

2005-07-02 Thread Thorsten Dahlheimer
Configuration Information [Automatically generated, do not change]: Machine: i586 OS: cygwin Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i586' -DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='i586-pc-cygwin' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/ locale' -DPACKAGE='bash' -

Re: nullglob option breaks complex parameter expansion/deletion

2005-07-02 Thread Michael Wardle
On Sat, 2005-07-02 at 12:24 -0400, Chet Ramey wrote: > Michael Wardle wrote: > > Hi Chet > > > > Thanks for your very prompt reply. > > > > I understand that globbing is happening, but I don't understand why > > deleting a parameter should occur with nullglob set if the parameter > > matches but

Re: Inconsistent handling of arrays.

2005-07-02 Thread Chet Ramey
Aaron Marks wrote: > Bash Version: 3.0 > Patch Level: 0 > Release Status: release > > Description: > The array handling is inconsistent across global variables and > local variables. See the Repeat-By for more information. This is the same problem, with the same fix, as the `decl

Re: nullglob option breaks complex parameter expansion/deletion

2005-07-02 Thread Chet Ramey
Michael Wardle wrote: > Hi Chet > > Thanks for your very prompt reply. > > I understand that globbing is happening, but I don't understand why > deleting a parameter should occur with nullglob set if the parameter > matches but the word to delete doesn't. The bash behavior seems to make > this c

Re: Feature-Request: Append command to history

2005-07-02 Thread Chet Ramey
Matthias Schniedermeyer wrote: > Thank you for this great news. :-) > > How do you plan to "fix" that bug? Don't delete the last command from the history if it was pushed with `history -s'. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ( ``Discere est Dolere'' -- chet )

Re: Controlling terminal race condition

2005-07-02 Thread Chet Ramey
Paul Jarc wrote: > Jeff Miller <[EMAIL PROTECTED]> wrote: > >>It is possible on our test Solaris 8 system that the original >>calling bash shell will set the controlling process of the terminal >>to the pid that it originally forked to after the new process had >>been created. In this case is not

Inconsistent handling of arrays.

2005-07-02 Thread Aaron Marks
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='lin$uname output: Linux crx 2.6.12 #4 Thu Jun 30 12:33:41 EST 2005 i686 unknown unk$Machine Type: i686-pc-linux-g

Re: nullglob option breaks complex parameter expansion/deletion

2005-07-02 Thread Michael Wardle
> I also noticed in the POSIX standard that quoting the word part should > cause it to be literal and prevent globbing. If I try this in bash, I > get the same result as in my original message, that is: > > $ shopt -s nullglob > $ connectioninfo='${HOST%%".*"} ${USER}' > $ echo $connectioninfo >

Re: nullglob option breaks complex parameter expansion/deletion

2005-07-02 Thread Michael Wardle
Hi Chet Thanks for your very prompt reply. I understand that globbing is happening, but I don't understand why deleting a parameter should occur with nullglob set if the parameter matches but the word to delete doesn't. The bash behavior seems to make this construct useful only for file name del