Anonymous | Login | 2023-12-05 12:19 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 | ||
0001442 | [1003.1(2016/18)/Issue7+TC2] Shell and Utilities | Comment | Enhancement Request | 2021-01-10 13:10 | 2021-11-25 16:08 | ||
Reporter | andras_farkas | View Status | public | ||||
Assigned To | |||||||
Priority | normal | Resolution | Accepted | ||||
Status | Applied | ||||||
Name | Andras Farkas | ||||||
Organization | |||||||
User Reference | |||||||
Section | getopts | ||||||
Page Number | 2840 | ||||||
Line Number | 93538 and 93541 | ||||||
Interp Status | --- | ||||||
Final Accepted Text | |||||||
Summary | 0001442: Improvement to getopts example, remove double negation | ||||||
Description |
On getopts's page https://pubs.opengroup.org/onlinepubs/9699919799/utilities/getopts.html [^] The example uses interesting double negation in the two tests: if [ ! -z "$aflag" ]; then if [ ! -z "$bflag" ]; then ! -z could be shortened to -n |
||||||
Desired Action |
Replace if [ ! -z "$aflag" ]; then with if [ -n "$aflag" ]; then and if [ ! -z "$bflag" ]; then with if [ -n "$bflag" ]; then |
||||||
Tags | tc3-2008 | ||||||
Attached Files | |||||||
|
There are no notes attached to this issue. |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |