Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000192 [1003.1(2008)/Issue 7] Shell and Utilities Comment Error 2009-12-10 15:14 2013-04-16 13:06
Reporter geoffclare View Status public  
Assigned To ajosey
Priority normal Resolution Accepted As Marked  
Status Closed  
Name Geoff Clare
Organization The Open Group
User Reference
Section basename
Page Number 2465
Line Number 78649
Interp Status ---
Final Accepted Text Note: 0000327
Summary 0000192: basename examples should use "--"
Description The 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 Action On 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"
Tags tc1-2008
Attached Files

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

-  Notes
(0000324)
eblake (manager)
2009-12-10 15:22
edited on: 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)"

(0000327)
geoffclare (manager)
2009-12-10 17:06

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 => Note: 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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker