This program sorts lines in input alphabetically/numerically depending on the arguments passed to main.
So i came accros this exercise in k&R:
Add a field-handling capability, so sorting may be done on fields within lines, each field sorted according to an independent set of options. (The index for this book was sorted with -df for the index category and -n for the page numbers.)
I suppose field is a string of characters in between blanks, is that correct?
The way i tought i should handle this is, let the user enter max 2 numbers in arguments: first for the starting field, second for the ending field, and then perform comparison of all the lines between those fields, and ofcourse work properly with flags aswell
Is this about~ what the authors had in their minds?