Anonymous | Login | 2024-04-24 14:00 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Type | Date Submitted | Last Update | ||
0000958 | [1003.1(2013)/Issue7+TC1] Shell and Utilities | Editorial | Enhancement Request | 2015-06-12 09:45 | 2019-06-10 08:54 | ||
Reporter | stephane | View Status | public | ||||
Assigned To | |||||||
Priority | normal | Resolution | Accepted As Marked | ||||
Status | Closed | ||||||
Name | Stephane Chazelas | ||||||
Organization | |||||||
User Reference | |||||||
Section | http://pubs.opengroup.org/onlinepubs/9699919799/utilities/read.html [^] | ||||||
Page Number | 3154 | ||||||
Line Number | 105406 | ||||||
Interp Status | --- | ||||||
Final Accepted Text | See Note: 0002762 | ||||||
Summary | 0000958: misleading description for the "read" utility | ||||||
Description |
The "read" utility is currently described as: read - read a line from standard input That is misleading. First, "read" may read more than one line (it reads a backslash-continued line, which is different from the usual definition of "line"). Then, its primary purpose is to assign shell variables from *words* read from standard input (using a complex processing algorithm) We see too many scripts around that do: while read line; do... while the authors meant: while IFS= read -r line; do or while line=`line`; do # that one removed in SUSv3 Having a description like "read a line from standard input" just encourages that behaviour. |
||||||
Desired Action |
Change the description in the top "Name" section to: read - read words from standard input into shell variables The first paragraph after that could also be clarified. |
||||||
Tags | tc2-2008 | ||||||
Attached Files | |||||||
|
Issue History | |||
Date Modified | Username | Field | Change |
2015-06-12 09:45 | stephane | New Issue | |
2015-06-12 09:45 | stephane | Name | => Stephane Chazelas |
2015-06-12 09:45 | stephane | Section | => http://pubs.opengroup.org/onlinepubs/9699919799/utilities/read.html [^] |
2015-06-12 09:45 | stephane | Page Number | => http://pubs.opengroup.org/onlinepubs/9699919799/utilities/read.html [^] |
2015-06-12 09:45 | stephane | Line Number | => Name section |
2015-07-02 16:29 | rhansen | Page Number | http://pubs.opengroup.org/onlinepubs/9699919799/utilities/read.html [^] => 3154 |
2015-07-02 16:29 | rhansen | Line Number | Name section => 105406 |
2015-07-02 16:29 | rhansen | Interp Status | => --- |
2015-07-16 15:47 | nick | Note Added: 0002762 | |
2015-07-16 15:48 | nick | Final Accepted Text | => See Note: 0002762 |
2015-07-16 15:48 | nick | Status | New => Resolved |
2015-07-16 15:48 | nick | Resolution | Open => Accepted As Marked |
2015-07-16 15:48 | nick | Tag Attached: tc2-2008 | |
2015-07-16 15:51 | nick | Note Edited: 0002762 | |
2019-06-10 08:54 | agadmin | Status | Resolved => Closed |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |