Austin Group Defect Tracker

Aardvark Mark IV


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

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2021-01-10 13:10 andras_farkas New Issue
2021-01-10 13:10 andras_farkas Name => Andras Farkas
2021-01-10 13:10 andras_farkas Section => getopts
2021-01-10 22:42 Don Cragun Page Number => 2840
2021-01-10 22:42 Don Cragun Line Number => 93538 and 93541
2021-01-10 22:42 Don Cragun Interp Status => ---
2021-10-28 15:48 Don Cragun Status New => Resolved
2021-10-28 15:48 Don Cragun Resolution Open => Accepted
2021-10-28 15:48 Don Cragun Tag Attached: tc3-2008
2021-11-25 16:08 geoffclare Status Resolved => Applied


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker