Two keys are specified for sorting the input.txt file. --keys is the keyword parameter that says one or more keys follow. Each key is enclosed in a pair of brackets. There is no limit on the number of keys that can be specified. In this example there is a String key and a Date key. Since the String key is specified first it will be used in the sort first. The Date key, in this example, will only be used if the String key is the same on two rows. The Date will be used as the "tie breaker". That same rule applies if more keys are specified: the following key is used as a tie breaker only if every other key before it is the same on two rows.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Two keys are specified for sorting the input.txt file. --keys is the keyword parameter that says one or more keys follow. Each key is enclosed in a pair of brackets. There is no limit on the number of keys that can be specified. In this example there is a String key and a Date key. Since the String key is specified first it will be used in the sort first. The Date key, in this example, will only be used if the String key is the same on two rows. The Date will be used as the "tie breaker". That same rule applies if more keys are specified: the following key is used as a tie breaker only if every other key before it is the same on two rows.