#!/bin/sh
#
#SCCSID = 	@(#)dirname.sh	4.1		(ULTRIX)	7/2/90
#

expr \
  ${1-.}'/' : '\(/\)[^/]*/$' \
  \| ${1-.}'/' : '\(.*[^/]\)//*[^/][^/]*//*$' \
  \| ${1-.}'/' : '\(/\)' \
  \| .
