Anonymous | Login | 2024-04-24 06: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 | ||
0000962 | [1003.1(2013)/Issue7+TC1] Shell and Utilities | Comment | Clarification Requested | 2015-06-20 20:42 | 2019-06-10 08:54 | ||
Reporter | rhymoid | View Status | public | ||||
Assigned To | |||||||
Priority | normal | Resolution | Accepted As Marked | ||||
Status | Closed | ||||||
Name | Stijn van Drongelen | ||||||
Organization | |||||||
User Reference | |||||||
Section | sort | ||||||
Page Number | 3211 | ||||||
Line Number | 107616-107618 | ||||||
Interp Status | Approved | ||||||
Final Accepted Text | see Note: 0002764 | ||||||
Summary | 0000962: Should utilities continue when reading one of multiple files fails? | ||||||
Description |
Consider the following sequence of commands: set +e rm -f aaaa echo something >xxxx echo c_mpletely >yyyy echo different >zzzz cat aaaa xxxx 2>/dev/null sed -e s/_/o/ aaaa yyyy 2>/dev/null sort aaaa zzzz 2>/dev/null On FreeBSD and Mac OS X, this sequence prints the following to standard output something completely To be specific: cat and sed continue their task when a specified file could not be opened, while sort terminates without output to stdout when any of the specified files could not be opened. From the description of cat in the POSIX specification, it seems that it is not defined whether the cat, sed, and sort utilities should terminate when an error occurred when processing a specified file. It would seem that the output of the sequence above may range from "" to "something\ncompletely\ndifferent\n" across POSIX implementations. |
||||||
Desired Action | Clarify the constraints, if any, on the behaviour of cat, sed, and sort when opening or reading one of their input files fails. | ||||||
Tags | tc2-2008 | ||||||
Attached Files | |||||||
|
Issue History | |||
Date Modified | Username | Field | Change |
2015-06-20 20:42 | rhymoid | New Issue | |
2015-06-20 20:42 | rhymoid | Name | => Stijn van Drongelen |
2015-06-20 20:42 | rhymoid | Section | => cat, sed, sort |
2015-06-20 20:42 | rhymoid | Page Number | => N/A |
2015-06-20 20:42 | rhymoid | Line Number | => N/A |
2015-06-22 08:41 | geoffclare | Note Added: 0002727 | |
2015-07-16 15:53 | rhansen | Section | cat, sed, sort => sort |
2015-07-16 15:53 | rhansen | Page Number | N/A => 3211 |
2015-07-16 15:53 | rhansen | Line Number | N/A => 107616-107618 |
2015-07-16 15:53 | rhansen | Interp Status | => --- |
2015-07-16 16:15 | rhansen | Note Added: 0002764 | |
2015-07-16 16:16 | rhansen | Interp Status | --- => Pending |
2015-07-16 16:16 | rhansen | Final Accepted Text | => see Note: 0002764 |
2015-07-16 16:16 | rhansen | Status | New => Interpretation Required |
2015-07-16 16:16 | rhansen | Resolution | Open => Accepted As Marked |
2015-07-16 16:16 | rhansen | Tag Attached: tc2-2008 | |
2015-07-17 07:59 | ajosey | Interp Status | Pending => Proposed |
2015-07-17 07:59 | ajosey | Note Added: 0002769 | |
2015-09-07 11:32 | ajosey | Interp Status | Proposed => Approved |
2015-09-07 11:32 | ajosey | Note Added: 0002816 | |
2019-06-10 08:54 | agadmin | Status | Interpretation Required => Closed |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |