You can do this without external programs or pipes.
See the attachment.
JGH
On Mon, 6 Nov 2006, Dan Jacobson wrote:
Regarding the
${parameter/pattern/string}
${parameter//pattern/string}
discussion on the man page:
You don't mention what if pattern is null.
Seems that will never ma
I have attached an example program that can deal with
the different regex parsing in 3.0.x vs. 3.1.x and
regex sub-expressions. I have tested with
3.1.17 and 3.2.3 successfully. Since creating a
script that actually worked with both bash versions
took me a while, I suspect other people might wan
Ok, so at least I'm not crazy; there is some kind of bug.
When you have a patch I'm eager to help test it.
Thank you,
JGH
On Thu, 12 Oct 2006, Chet Ramey wrote:
Ok, here is a smaller 3 line test case. I have attempted to handle
the parenthesis as you instructed. Under bash 3.0.17 BASH_REMAT
1.tgz =~
\([^-]+\)-\([^-]+\)-\([^-]+\)-0*\([1-9][0-9]*\)\.tgz ]]
set | grep BASH_REMATCH
On Thu, 12 Oct 2006, Andreas Schwab wrote:
John Gatewood Ham <[EMAIL PROTECTED]> writes:
Thank you for your reply.
I removed the quotes and the script crashes. There must be more
required to conv
Thank you for your reply.
I removed the quotes and the script crashes. There must be more
required to convert my code and I hope someone will help. It is
only 1 line, and once I know the new rules I can convert everything
else on my own. I get this when just removing teh quotes on the
right ha
Configuration Information [Automatically generated, do not change]:
Machine: i586
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i586'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i586-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='b
Configuration Information [Automatically generated, do not change]:
Machine: i586
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i586'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i586-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='b