On Fri, 25 Apr 2008, Denys Vlasenko wrote:

> > See for example this line in the named script:
> >
> >   [ -n "$bindir" ] || bindir=$(dirname $(pwd))
> >
> > Can someone provide a backtick equivalent example?
>
> It's ugly:
>
> `dirname \`pwd\``

That's that I meant.
In this particular case, it could be done like this:

[ "$bindir" ] || {
        bindir=$(pwd)           # can this fail?
        bindir=${bindir%/*}
}

No need for dirname.


Cheers,

-- 
Cristian
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to