home *** CD-ROM | disk | FTP | other *** search
- :
- #
- # @(#) dirname.sh 1.1 86/12/18
- #
- # Copyright (C) Microsoft Corporation, 1983
- #
- # This Module contains Proprietary Information of Microsoft
- # Corporation and AT&T, and should be treated as Confidential.
- #
- : '
- #*** dirname -- deliver directory portion of pathname
- #
- # dirname string
- #
- # MODIFICATION HISTORY
- # M000 18 Apr 83 andyp
- # - 3.0 upgrade. No changes.
- # M001 11 Apr 84 sco!blf
- # - Fix it so it works in more cases.
- : '
-
- PATH=/bin:/usr/bin
- exec expr \
- "${1-.}/" : '\(/\)[^/]*/$' \
- \| "${1-.}/" : '\(.*[^/]\)//*[^/][^/]*//*$' \
- \| .
-