View Issue Details

IDProjectCategoryView StatusLast Update
00015991003.1(2016/18)/Issue7+TC2Shell and Utilitiespublic2024-06-11 09:07
Reportergeoffclare Assigned To 
PrioritynormalSeverityObjectionTypeError
Status ClosedResolutionAccepted 
NameGeoff Clare
OrganizationThe Open Group
User Reference
Sectionstrings
Page Number3259
Line Number109562
Interp Status---
Final Accepted Text
Summary0001599: Unspecified behaviour for "strings -" too narrow
DescriptionThe strings DESCRIPTION says:
If the first argument is '-', the results are unspecified.

However, many implementations also treat '-' as special when it is not the first argument. They handle it as if it were a -a option, so:

strings -n 1 - file

is equivalent to:

strings -n 1 -a file

On Solaris, macOS, and HP-UX, this includes still recognising options after '-', e.g. for:

strings -n 1 - -t x file

the -t x is recognised as an option. (Whereas GNU, with POSIXLY_CORRECT, reports that files named -t and x were not found.)

GNU, Solaris, and HP-UX also treat an operand of '-' that is not the first argument as special. (For GNU it turns on -a for later files; for Solaris it turns on -a for all files; for HP-UX it is treated as a file named '-a'!)
Desired ActionOn page 3259 line 109562 section strings, change:
If the first argument is '-', the results are unspecified.
to:
If any argument is '-', the results are unspecified.

Tagstc3-2008

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2022-08-15 10:26 geoffclare New Issue
2022-08-15 10:26 geoffclare Name => Geoff Clare
2022-08-15 10:26 geoffclare Organization => The Open Group
2022-08-15 10:26 geoffclare Section => strings
2022-08-15 10:26 geoffclare Page Number => 3259
2022-08-15 10:26 geoffclare Line Number => 109562
2022-08-15 10:26 geoffclare Interp Status => ---
2022-10-27 15:20 Don Cragun Status New => Resolved
2022-10-27 15:20 Don Cragun Resolution Open => Accepted
2022-10-27 15:21 Don Cragun Tag Attached: tc3-2008
2022-11-08 14:10 geoffclare Status Resolved => Applied
2024-06-11 09:07 agadmin Status Applied => Closed