|
From: | Filipus Klutiero |
Subject: | bug#6175: dirname manpage and info page partially wrong/misleading |
Date: | Tue, 11 May 2010 17:17:22 -0400 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100411 Icedove/3.0.4 |
The parenthese is wrong; there is no reason to presume the file given is a regular file, dirname is equally useful on directories. "presumably" should perhaps be replaced by "usually", or removed.`dirname' prints all but the final slash-delimited component of a string (presumably a file name, but also works on directories).
The manual page is much more confusing, saying:
DESCRIPTIONPrint NAME with its trailing /component removed; if NAME contains no /'s, output `.' (meaning the current directory).
dirname is more complex than just removing a trailing slash followed by a pathname component if that is the ending. For example, it also removes a slash followed by a pathname component followed by a slash, if that is how the path terminates. The manual should probably adopt the info page's formulation, which is more vague, but not wrong.
[Prev in Thread] | Current Thread | [Next in Thread] |