Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用以下命令从文件中删除重复项。
awk -F"," '!x[$1]++' test.csv
我怎样才能让它忽略第 1 列的大小写?
我试过awk -F"," '{IGNORECASE = 1} !x[$1]++' test.csv了,但它似乎不起作用。
awk -F"," '{IGNORECASE = 1} !x[$1]++' test.csv
使用礼帽:
awk -F"," '!x[toupper($1)]++' test.csv
awk -F"," '!x[tolower($1)]++' test.csv