<s>
dirname	B-Device
is	O
a	O
standard	O
computer	B-Application
program	I-Application
on	O
Unix	B-Application
and	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
.	O
</s>
<s>
When	O
dirname	B-Device
is	O
given	O
a	O
pathname	B-Application
,	O
it	O
will	O
delete	O
any	O
suffix	O
beginning	O
with	O
the	O
last	O
slash	O
('/'	O
)	O
character	O
and	O
return	O
the	O
result	O
.	O
</s>
<s>
dirname	B-Device
is	O
described	O
in	O
the	O
Single	O
UNIX	B-Application
Specification	O
and	O
is	O
primarily	O
used	O
in	O
shell	B-Language
scripts	I-Language
.	O
</s>
<s>
The	O
version	O
of	O
dirname	B-Device
bundled	O
in	O
GNU	B-Application
coreutils	I-Application
was	O
written	O
by	O
David	O
MacKenzie	O
and	O
Jim	O
Meyering	O
.	O
</s>
<s>
The	O
command	B-Application
is	O
available	O
as	O
a	O
separate	O
package	O
for	O
Microsoft	B-Application
Windows	I-Application
as	O
part	O
of	O
the	O
UnxUtils	B-Application
collection	O
of	O
native	B-Language
Win32	B-Library
ports	O
of	O
common	O
GNU	B-Operating_System
Unix-like	B-Operating_System
utilities	O
.	O
</s>
<s>
The	O
command	B-Application
has	O
also	O
been	O
ported	O
to	O
the	O
IBM	B-Application
i	I-Application
operating	B-General_Concept
system	I-General_Concept
.	O
</s>
<s>
The	O
Single	O
UNIX	B-Application
Specification	O
for	O
dirname	B-Device
is	O
:	O
</s>
<s>
Since	O
dirname	B-Device
accepts	O
only	O
one	O
operand	O
,	O
its	O
usage	O
within	O
the	O
inner	O
loop	O
of	O
shell	B-Language
scripts	I-Language
can	O
be	O
detrimental	O
to	O
performance	O
.	O
</s>
<s>
Note	O
that	O
these	O
handle	O
trailing	O
slashes	O
differently	O
than	O
dirname	B-Device
.	O
</s>
