Free LPI 010-160 Actual Exam Questions - Question 3 Discussion
B/D? D is definitely out since wc counts words, lines, or bytes, not sorting. A and C don’t look like valid commands at all, and E’s grep doesn’t have a --sort option as far as I know. B is the only standard command for sorting files alphabetically, so I’d go with B here. If the question wanted something more specific about columns or case sensitivity, it would probably mention it explicitly.
A and C look fake, so B seems the only legit sorting command here.
B imo, because commands like wc and grep don’t actually sort anything—they’re for counting and searching. The only real sorting command here is sort, so B fits best.
Just to add, commands like wc or grep don’t sort but count or search, so they’re easy to rule out. The nonsense ones like abc or a..z aren’t real commands either. So sorting has to be B, right?
Option B makes the most sense since sort is specifically designed to order lines alphabetically. The other commands don’t match that function or aren’t valid for this purpose.
B. The only command here that actually sorts lines is sort, so it’s the straightforward pick. Others don’t handle sorting or aren’t valid commands at all.
B