Question 150
A production support team notices: A report script sorts numeric counts but places 100 before 20. Which statement BEST explains the behavior?
Explanation
Correct Answer
The decisive distinction is that alphabetic ordering of digit strings differs from numeric order. Confirm with a targeted check: counts display in increasing numeric order.
Incorrect Answers
Counting raw output bytes or words does not count matched log records. That can explain why a security script needs an exact count of lines matching a pattern rather than the matching text, whereas the current evidence supports lexicographic sorting compares character sequences rather than numeric magnitude.
It would account for a command fails but a pipeline reports success because the final grep exits zero, not the current evidence. For this incident, alphabetic ordering of digit strings differs from numeric order; the alternative mechanism leaves that distinction unexplained.
Cron or systemd may run a script with a different current directory. That can explain why a script reads a report but the path is relative and the current working directory changes, whereas the current evidence supports lexicographic sorting compares character sequences rather than numeric magnitude.





CompTIA Linux+ (XK0-006) Practice Tests