View Issue Details

IDProjectCategoryView StatusLast Update
00001921003.1(2008)/Issue 7Shell and Utilitiespublic2013-04-16 13:06
Reportergeoffclare Assigned Toajosey  
PrioritynormalSeverityCommentTypeError
Status ClosedResolutionAccepted As Marked 
NameGeoff Clare
OrganizationThe Open Group
User Reference
Sectionbasename
Page Number2465
Line Number78649
Interp Status---
Final Accepted Text0000192:0000327
Summary0000192: basename examples should use "--"
DescriptionThe basename examples should use "--", otherwise if "string" or "$1"
begins with a dash, the commands might not behave as described.
Likewise in the rationale, and the rationale for dirname.

It would also be worth adding a pointer to the basename examples
on the dirname page.
Desired ActionOn lines 78649 and 78652 in EXAMPLES, and lines 78664 and 78666 in
RATIONALE change

    "string"

(including the quotes) to

    -- "string"

On lines 78659 and 78660 change the three occurrences of

    "$1"

(including the quotes) to

    -- "$1"

At page 2609 line 84135 section dirname, add

    "See also the examples for [xref to basename utility]."

At page 2610 line 84142,84144 section dirname, change

    "string"

(including the quotes) to

    -- "string"
Tagstc1-2008

Relationships

has duplicate 0000250 Resolvedajosey 1003.1(2008)/Issue 7 Fix pathname processing error (missing quotes) in basename example 
related to 0000538 Closedajosey 2008-TC1 Missing part of basename changes from bug 192 

Activities

eblake

2009-12-10 15:22

manager   bugnote:0000324

Last edited: 2009-12-10 15:25

Line 78659 needs further changes to prevent against field splitting, as well as protecting c99 as much as dirname. Change:

c99 $(dirname "$1")/$(basename "$1" .c).c
mv a.out $(basename "$1" .c)

to:

c99 -- "$(dirname -- "$1")/$(basename -- "$1" .c).c"
mv a.out "$(basename -- "$1" .c)"

geoffclare

2009-12-10 17:06

manager   bugnote:0000327

On lines 78649 and 78652 in EXAMPLES, and lines 78664 and 78666 in
RATIONALE change

    "string"

(including the quotes) to

    -- "string"

At line 78659 change:

    c99 $(dirname "$1")/$(basename "$1" .c).c
    mv a.out $(basename "$1" .c)

to:

    c99 -- "$(dirname -- "$1")/$(basename -- "$1" .c).c" &&
    mv a.out "$(basename -- "$1" .c)"

At page 2609 line 84135 section dirname, add

    "See also the examples for [xref to basename utility]."

At page 2610 line 84142,84144 section dirname, change

    "string"

(including the quotes) to

    -- "string"

Issue History

Date Modified Username Field Change
2009-12-10 15:14 geoffclare New Issue
2009-12-10 15:14 geoffclare Status New => Under Review
2009-12-10 15:14 geoffclare Assigned To => ajosey
2009-12-10 15:14 geoffclare Name => Geoff Clare
2009-12-10 15:14 geoffclare Organization => The Open Group
2009-12-10 15:14 geoffclare Section => basename
2009-12-10 15:14 geoffclare Page Number => 2465
2009-12-10 15:14 geoffclare Line Number => 78649
2009-12-10 15:14 geoffclare Interp Status => ---
2009-12-10 15:22 eblake Note Added: 0000324
2009-12-10 15:25 eblake Note Edited: 0000324
2009-12-10 17:06 geoffclare Note Added: 0000327
2009-12-10 17:07 msbrown Final Accepted Text => 0000192:0000327
2009-12-10 17:07 msbrown Status Under Review => Resolved
2009-12-10 17:07 msbrown Resolution Open => Accepted As Marked
2009-12-10 17:07 msbrown Desired Action Updated
2010-05-06 15:54 geoffclare Relationship added has duplicate 0000250
2010-08-27 13:01 ajosey Tag Attached: tc1-2008
2012-01-23 10:25 geoffclare Relationship added related to 0000538
2013-04-16 13:06 ajosey Status Resolved => Closed