Re: string format

2009-09-23 Thread Mike Stroyan
On Wed, Sep 23, 2009 at 12:03:56PM -0700, eatsubway wrote: > > hello, i have a simple question. I have a string which i would like to > format by replacing spaces with newlines and tabs, and also adding a tab to > the beginning. The printf builtin will do that easily. If you give it a format

bash 4 parse error on here-document in $()

2009-09-23 Thread Martin Sebor
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPA

string format

2009-09-23 Thread eatsubway
hello, i have a simple question. I have a string which i would like to format by replacing spaces with newlines and tabs, and also adding a tab to the beginning. the variable... MyVar="Hello, how are you doing today?" I would like to print this Hello, how are you doing tod

Change in behaviour regarding subshell handling?

2009-09-23 Thread Martin Michlmayr
I noticed that bash has changed behaviour regarding subshell handling, breaking a script of mine. Now a script with -e fails when a subshell fails whereas it didn't before. I looked at the CHANGES file and couldn't find anything about this, so I wanted to ask if this change was intentional or if

Re: filename pattern case-insensitive, but why?

2009-09-23 Thread Richard Leeden
Mike Stroyan wrote: On Tue, Sep 22, 2009 at 02:36:30AM -0700, thahn01 wrote: Hello, If I try something like: $ touch a.c b.c A.c $ ls [a-z]*.c a.c A.c b.c then I get A.c in the output, even if no capital letters are to be found. The "[a-z]" range expression matches characters between a a

Re: Strange compgen behaviour

2009-09-23 Thread Mathias Dahl
> It depends heavily on how the variables IFS and zf are set. From 'man bash': > > -W wordlist >     The  wordlist is split using the characters in the IFS special >     variable as delimiters, and each resultant word is expanded. >     The possible completions are the members  of  the  resultant >

Re: Strange compgen behaviour

2009-09-23 Thread Bernd Eggink
Mathias Dahl schrieb: Hi fellow bashers! I am trying to add some completion to a command. The completion should list all movies I have in a certain folder, regardless if I am in that folder or not. I have kind of got it to work in several variants but all have some issue. The current problem I a