PATCH: bad sed expression

David Relson relson at osagesoftware.com
Tue Jan 7 03:30:35 CET 2003


At 09:12 PM 1/6/03, Matthias Andree wrote:

>David Relson <relson at osagesoftware.com> writes:
>
> > What might work is to use the basename command, as in
> >
> >          NAME="./`basename $0 | sed s@\./t\.@@`"
> >
> > It does the right thing on my machine.  Let me know how it works for you.
>
>$0 is evil, particularly if shebang (directly running the test from the
>command-line) comes into play. It can be anything, the interpreter, the
>shell's name, with or without pass, only it's not telling you the next
>day's weather prospects. We haven't yet had reports that $0 was /bin/sh
>or something, so it can stay in, but I figured it ultimately took the .*
>-- which is on the MIME branch already.

As you know, I like having a human recognizable name for saving command 
line output.  I'd be willing to modify each of the test scripts so that 
they pass a name (equivalent to "basename $0 | sed ...") to t.frame.  Do 
you think that would help?





More information about the bogofilter-dev mailing list