我按以下顺序保存此数据: CUSTOMER-ID STATE ZIPCODE LASTNAME FIRSTNAME Money_spent
REDACTED
我如何按优先级对这些数据进行排序?
1st Priority - State
2nd Priority - zipcode (descending order)
3rd Priority - lastname
4th Priority - firstname
我目前尝试过:
sort -t ',' -k1.1,1.1 -k12 -k13 -nr -k3.1,1.1 -k2.1,1.1 -s "summary.csv"
它似乎只想对 id 进行排序
预期输出:
REDACTED