[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: portability of dirname and ${var%x*}

From: Paul Eggert
Subject: Re: portability of dirname and ${var%x*}
Date: Wed, 26 Jan 2005 17:03:55 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Stepan Kasal <address@hidden> writes:

> Could you please name some OS version?

I recall that NextSTEP didn't have it.  Traditionally, BSD-based
systems didn't have dirname.

> Are these systems still in use?

Certainly it was an issue 10 years ago.  I dunno if such systems are
still in use.

> 2) Can I use something like ${0%/*} or ${pathname%%*/} ?
> These variable expansions are required by POSIX.
> I was told that Solaris /bin/sh doesn't honor them.

That's correct.  You get a "bad substitution" error message (on
Solaris 9, anyway).

> Shouldn't the manual contain a section about them?

Yes, it should.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]