From unknown Sun Jun 15 08:36:40 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10342: Bug Report for command "dirname" Resent-From: RANJITH REDDY KOMANLA Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 21 Dec 2011 17:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10342 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 10342@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.132449026514264 (code B ref -1); Wed, 21 Dec 2011 17:58:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Dec 2011 17:57:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdQQD-0003i1-G5 for submit@debbugs.gnu.org; Wed, 21 Dec 2011 12:57:45 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdP3g-0001jb-5K for submit@debbugs.gnu.org; Wed, 21 Dec 2011 11:30:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RdP1Z-0007Em-G1 for submit@debbugs.gnu.org; Wed, 21 Dec 2011 11:28:19 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:48403) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdP1Z-0007Ei-EZ for submit@debbugs.gnu.org; Wed, 21 Dec 2011 11:28:13 -0500 Received: from eggs.gnu.org ([140.186.70.92]:34378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdP1T-0007Lo-SA for bug-coreutils@gnu.org; Wed, 21 Dec 2011 11:28:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RdP1I-0007AD-Q1 for bug-coreutils@gnu.org; Wed, 21 Dec 2011 11:28:07 -0500 Received: from mail-gy0-f169.google.com ([209.85.160.169]:41789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdP1I-00079d-Mp for bug-coreutils@gnu.org; Wed, 21 Dec 2011 11:27:56 -0500 Received: by ghrr18 with SMTP id r18so5420539ghr.0 for ; Wed, 21 Dec 2011 08:27:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=gW2nI5xMbvwvE+fgBEmR9XRFQL0nrM4DRfyOxyeJtkA=; b=Oy3oQd7+dKp+6bxpehu3NNdgS106lLK5XDDkFHHWSBCSNjboEcAWXelBJRqCBDHmzg ocE7I8d3N6mRUdEa+qR7L1wzR3869KQtnfkigYYFhQp+HVUq2q18Zu3cprIQMnq/7G7+ cJqQZquLDsauOBZKLSokQ8L4LHxWKEkXeMaj4= MIME-Version: 1.0 Received: by 10.50.187.226 with SMTP id fv2mr4264702igc.20.1324484875224; Wed, 21 Dec 2011 08:27:55 -0800 (PST) Received: by 10.50.242.66 with HTTP; Wed, 21 Dec 2011 08:27:55 -0800 (PST) Date: Wed, 21 Dec 2011 11:27:55 -0500 Message-ID: From: RANJITH REDDY KOMANLA Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.9 (-----) X-Mailman-Approved-At: Wed, 21 Dec 2011 12:57:45 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) Hello , Here is my case . pwd : /test ls -l : Nothing within the directory !! But when i tried using -----> dirname xyz it gave output as <.> { output states , present directory ,but there is not such filename/directory present within my test1 directory } If it had stated no such directory ,it would have served my purpose . Ignore : If i'm wrong or this bug is already cured . When i tried using the option dirname Regards Ranjith Reddy Komanla 816-265-1232 From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 21 13:08:40 2011 Received: (at control) by debbugs.gnu.org; 21 Dec 2011 18:08:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdQam-0003xj-16 for submit@debbugs.gnu.org; Wed, 21 Dec 2011 13:08:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdQah-0003xU-BA; Wed, 21 Dec 2011 13:08:38 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pBLI6TY1029591 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 21 Dec 2011 13:06:29 -0500 Received: from [10.3.113.42] (ovpn-113-42.phx2.redhat.com [10.3.113.42]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pBLI6SO2005717; Wed, 21 Dec 2011 13:06:28 -0500 Message-ID: <4EF22023.9040008@redhat.com> Date: Wed, 21 Dec 2011 11:06:27 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: RANJITH REDDY KOMANLA Subject: Re: bug#10342: Bug Report for command "dirname" References: In-Reply-To: X-Enigmail-Version: 1.3.4 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig1AE35848E04A4F419F15CD72" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Spam-Score: -10.3 (----------) X-Debbugs-Envelope-To: control Cc: 10342-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.3 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1AE35848E04A4F419F15CD72 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable tag 10342 notabug thanks On 12/21/2011 09:27 AM, RANJITH REDDY KOMANLA wrote: > ls -l : Nothing within the directory !! > But when i tried using -----> dirname xyz > it gave output as <.> { output states , present directory This is the correct behavior. It is required by POSIX - dirname is a completely textual operation that pays no attention to what exists or does not exist in your file system, and the dirname of a string that resembles a relative file name is the string '.' (the current directory is the correct dirname of a relative file name, if that relative name was indeed a file; but the algorithm works even if there is no file by that name). http://pubs.opengroup.org/onlinepubs/9699919799/utilities/dirname.html I'm closing this bug report, as there is no bug here. However, feel free to make further comments if you need more clarification, or help in determining if 'dirname' really is the best fit for the shell scripting task you were really attempting to solve. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig1AE35848E04A4F419F15CD72 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJO8iAkAAoJEKeha0olJ0NqmHIH/j8tx7Z6SEaQSowAIp/mH3S/ PaTZd3QX2BHzjAEQxrp4pXMEdW19vblLKQrlmYevdW/HuMObNkpEn0yBF0E3Uugl yEc0BQ6qSsLr0ncZBo1iau/uJxIRsYL86qvK/gRMh2Xwl+IS9CZac/Ijbzgpujxx 8dTExsmig0ynXK2IXaMwH2na3oJWA/vGLPpu6xbJEH+y+r1jQ2x0p9lHmdTbQYcy Wg7rTrb3xNp5DA1LDSn5Df0Ithdeq4FWjwe4LA0jHKXKXW8lofug1zrIoQyjfrDa 7FJ770lvkKNwo2H0CqWu8JRC6L6z+4M4VXz7LLQI6isu4TGVK65CyR9xE3mK180= =mSgZ -----END PGP SIGNATURE----- --------------enig1AE35848E04A4F419F15CD72-- From unknown Sun Jun 15 08:36:40 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: RANJITH REDDY KOMANLA Subject: bug#10342: closed (Re: bug#10342: Bug Report for command "dirname") Message-ID: References: <4EF22023.9040008@redhat.com> X-Gnu-PR-Message: they-closed 10342 X-Gnu-PR-Package: coreutils X-Gnu-PR-Keywords: notabug Reply-To: 10342@debbugs.gnu.org Date: Wed, 21 Dec 2011 18:09:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1324490942-15281-1" This is a multi-part message in MIME format... ------------=_1324490942-15281-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #10342: Bug Report for command "dirname" which was filed against the coreutils package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 10342@debbugs.gnu.org. --=20 10342: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D10342 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1324490942-15281-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 10342-done) by debbugs.gnu.org; 21 Dec 2011 18:08:40 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdQal-0003xh-N6 for submit@debbugs.gnu.org; Wed, 21 Dec 2011 13:08:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdQah-0003xU-BA; Wed, 21 Dec 2011 13:08:38 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pBLI6TY1029591 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 21 Dec 2011 13:06:29 -0500 Received: from [10.3.113.42] (ovpn-113-42.phx2.redhat.com [10.3.113.42]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pBLI6SO2005717; Wed, 21 Dec 2011 13:06:28 -0500 Message-ID: <4EF22023.9040008@redhat.com> Date: Wed, 21 Dec 2011 11:06:27 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: RANJITH REDDY KOMANLA Subject: Re: bug#10342: Bug Report for command "dirname" References: In-Reply-To: X-Enigmail-Version: 1.3.4 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig1AE35848E04A4F419F15CD72" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Spam-Score: -10.3 (----------) X-Debbugs-Envelope-To: 10342-done Cc: 10342-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.3 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1AE35848E04A4F419F15CD72 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable tag 10342 notabug thanks On 12/21/2011 09:27 AM, RANJITH REDDY KOMANLA wrote: > ls -l : Nothing within the directory !! > But when i tried using -----> dirname xyz > it gave output as <.> { output states , present directory This is the correct behavior. It is required by POSIX - dirname is a completely textual operation that pays no attention to what exists or does not exist in your file system, and the dirname of a string that resembles a relative file name is the string '.' (the current directory is the correct dirname of a relative file name, if that relative name was indeed a file; but the algorithm works even if there is no file by that name). http://pubs.opengroup.org/onlinepubs/9699919799/utilities/dirname.html I'm closing this bug report, as there is no bug here. However, feel free to make further comments if you need more clarification, or help in determining if 'dirname' really is the best fit for the shell scripting task you were really attempting to solve. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig1AE35848E04A4F419F15CD72 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJO8iAkAAoJEKeha0olJ0NqmHIH/j8tx7Z6SEaQSowAIp/mH3S/ PaTZd3QX2BHzjAEQxrp4pXMEdW19vblLKQrlmYevdW/HuMObNkpEn0yBF0E3Uugl yEc0BQ6qSsLr0ncZBo1iau/uJxIRsYL86qvK/gRMh2Xwl+IS9CZac/Ijbzgpujxx 8dTExsmig0ynXK2IXaMwH2na3oJWA/vGLPpu6xbJEH+y+r1jQ2x0p9lHmdTbQYcy Wg7rTrb3xNp5DA1LDSn5Df0Ithdeq4FWjwe4LA0jHKXKXW8lofug1zrIoQyjfrDa 7FJ770lvkKNwo2H0CqWu8JRC6L6z+4M4VXz7LLQI6isu4TGVK65CyR9xE3mK180= =mSgZ -----END PGP SIGNATURE----- --------------enig1AE35848E04A4F419F15CD72-- ------------=_1324490942-15281-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 21 Dec 2011 17:57:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdQQD-0003i1-G5 for submit@debbugs.gnu.org; Wed, 21 Dec 2011 12:57:45 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RdP3g-0001jb-5K for submit@debbugs.gnu.org; Wed, 21 Dec 2011 11:30:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RdP1Z-0007Em-G1 for submit@debbugs.gnu.org; Wed, 21 Dec 2011 11:28:19 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:48403) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdP1Z-0007Ei-EZ for submit@debbugs.gnu.org; Wed, 21 Dec 2011 11:28:13 -0500 Received: from eggs.gnu.org ([140.186.70.92]:34378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdP1T-0007Lo-SA for bug-coreutils@gnu.org; Wed, 21 Dec 2011 11:28:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RdP1I-0007AD-Q1 for bug-coreutils@gnu.org; Wed, 21 Dec 2011 11:28:07 -0500 Received: from mail-gy0-f169.google.com ([209.85.160.169]:41789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RdP1I-00079d-Mp for bug-coreutils@gnu.org; Wed, 21 Dec 2011 11:27:56 -0500 Received: by ghrr18 with SMTP id r18so5420539ghr.0 for ; Wed, 21 Dec 2011 08:27:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=gW2nI5xMbvwvE+fgBEmR9XRFQL0nrM4DRfyOxyeJtkA=; b=Oy3oQd7+dKp+6bxpehu3NNdgS106lLK5XDDkFHHWSBCSNjboEcAWXelBJRqCBDHmzg ocE7I8d3N6mRUdEa+qR7L1wzR3869KQtnfkigYYFhQp+HVUq2q18Zu3cprIQMnq/7G7+ cJqQZquLDsauOBZKLSokQ8L4LHxWKEkXeMaj4= MIME-Version: 1.0 Received: by 10.50.187.226 with SMTP id fv2mr4264702igc.20.1324484875224; Wed, 21 Dec 2011 08:27:55 -0800 (PST) Received: by 10.50.242.66 with HTTP; Wed, 21 Dec 2011 08:27:55 -0800 (PST) Date: Wed, 21 Dec 2011 11:27:55 -0500 Message-ID: Subject: Bug Report for command "dirname" From: RANJITH REDDY KOMANLA To: bug-coreutils@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 21 Dec 2011 12:57:45 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) Hello , Here is my case . pwd : /test ls -l : Nothing within the directory !! But when i tried using -----> dirname xyz it gave output as <.> { output states , present directory ,but there is not such filename/directory present within my test1 directory } If it had stated no such directory ,it would have served my purpose . Ignore : If i'm wrong or this bug is already cured . When i tried using the option dirname Regards Ranjith Reddy Komanla 816-265-1232 ------------=_1324490942-15281-1--