View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000877 | 1003.1(2013)/Issue7+TC1 | Shell and Utilities | public | 2014-09-18 12:47 | 2024-06-11 09:02 |
Reporter | joerg | Assigned To | |||
Priority | normal | Severity | Editorial | Type | Enhancement Request |
Status | Closed | Resolution | Accepted As Marked | ||
Name | Jörg Schilling | ||||
Organization | |||||
User Reference | |||||
Section | tail | ||||
Page Number | 3239 | ||||
Line Number | 108597-108742 | ||||
Interp Status | --- | ||||
Final Accepted Text | 0000877:0002425 | ||||
Summary | 0000877: tail should support the -r option | ||||
Description | UNIX systems include support for tail -r since at least 1980. The POSIX standard should follow existing practice. | ||||
Desired Action | Change line 108600 from: tail [−f] [−c number|−n number] [file] to: tail [−f | -r] [−c number|−n number] [file] After line 108631 add: -r Reverse. Copies lines from the specified starting point in the file in reverse order. The default for r is to print the entire file in reverse order. | ||||
Tags | issue8 |
|
On page 3239 line 108600 change from:to:tail [-f] [-c number|-n number] [file] tail [-f] [-c number|-n number] [file] tail -r [-n number] [file] On page 3239 lines 108629-108632 change from: -n numberto:This option shall be equivalent to -c number, except the starting location in the file shall be measured in lines instead of bytes. The origin for counting shall be 1; that is, -n +1 represents the first line of the file, -n -1 the last. -n numberIf -r is not specified, this option shall be equivalent to -c number, except the starting location in the file shall be measured in lines instead of bytes. The origin for counting shall be 1; that is, -n +1 represents the first line of the file, -n -1 the last. After line 108722 (page 3242), add a new paragraph to RATIONALE: The functionality made available by tail -r has been historically provided on some systems by a separate utility (tac), although tac traditionally lacked support for -n to limit the output. While both <tt>tail -n$n | tac</tt> and <tt>tac | head -n$n</tt> can be used to output a fixed length of reversed line output, the standard developers decided that it was preferable to have a single utility <tt>tail -r -n$n</tt> for the same purpose. Furthermore, in deciding whether to standardize tac rather than tail -r, it was determined that more implementations that have achieved POSIX certification had already implemented tail -r as an extension. |
|
I feel this should be tagged as Issue 8. As the proposal is a compromise of existing practice, as I heard the discussion, doesn't it need a sponsor and new reference implementation, or a citation of an existing reference implementation? |
|
Correct - since not all implementations support it yet, it must be Issue 8. However, among all implementations that currently support it, the proposal here captures the existing behavior, so those implementations serve as the reference implementation and we do not need any additional sponsor to standardize existing practice. |
|
Should we also add text to XRAT C.4.3 (page 3712, near line 127098) that explains why we chose 'tail -r' instead of 'tac' as the interface to standardize? |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-09-18 12:47 | joerg | New Issue | |
2014-09-18 12:47 | joerg | Name | => Jörg Schilling |
2014-09-18 12:47 | joerg | Section | => tail |
2014-09-18 12:47 | joerg | Page Number | => 3239 |
2014-09-18 12:47 | joerg | Line Number | => 108597-108742 |
2014-10-23 16:35 | geoffclare | Note Added: 0002425 | |
2014-10-23 16:36 | geoffclare | Note Edited: 0002425 | |
2014-10-23 18:00 | shware_systems | Note Added: 0002426 | |
2014-10-23 18:34 | eblake | Note Added: 0002427 | |
2014-10-23 22:44 | eblake | Note Added: 0002428 | |
2014-10-30 15:08 | shware_systems | Tag Attached: issue8 | |
2014-10-30 15:18 | geoffclare | Note Edited: 0002425 | |
2014-10-30 15:19 | geoffclare | Interp Status | => --- |
2014-10-30 15:19 | geoffclare | Final Accepted Text | => 0000877:0002425 |
2014-10-30 15:19 | geoffclare | Status | New => Resolved |
2014-10-30 15:19 | geoffclare | Resolution | Open => Accepted As Marked |
2020-04-03 14:55 | geoffclare | Status | Resolved => Applied |
2024-06-11 09:02 | agadmin | Status | Applied => Closed |