On Tue, Mar 09, 2010 at 12:26:27PM +0100, Andreas Tille wrote:
> > Your shell is bash, as it should (for the restore).
>
> Back from holiday I try to work down my mail backlog. I wonder why the first
> line
>
> #!/bin/bash
>
> does not have the effect of using bash as command interpreter.
I have ben wondering about that, too, but didn't really see
any further way to debug this.
> PS: It is always a good idea not to relay on specific Bash features if not
> really necessary.
I agree.
> IMHO the same effect as
>
> if [[ "$BACKUP" =~ .*\.bz2 ]] ; then
>
> can be reached by
>
> if echo "$BACKUP" | grep -q "\.bz2$" ; then
>
> (UNTESTED!) and works for any shell.
Even better would be to use "test", I suppose.
I am open to patches.
Karsten
--
GPG key ID E4071346 @
wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
_______________________________________________