Использование AWK с несколькими разделителями ⇐ Linux
-
Anonymous
Использование AWK с несколькими разделителями
I'm trying to get the first part of Column $1 with the entire Column $2,$3 and $5 but unfortunately I'm getting a different output
Input:
2023-08-01 05:30:01,Lakers,CA,LA,US 2023-10-05 16:40:23,Denver Nuggets,CO,DN,US 2024-01-20 16:40:23,Utah Jazz,UT,SLC,US Expected output
2023-08-01,Lakers,CA,US
cut -d, -f1,2,3,5 awk -F',' '{ print $1,$2,$3,$5 }'
Источник: https://stackoverflow.com/questions/780 ... delimiters
I'm trying to get the first part of Column $1 with the entire Column $2,$3 and $5 but unfortunately I'm getting a different output
Input:
2023-08-01 05:30:01,Lakers,CA,LA,US 2023-10-05 16:40:23,Denver Nuggets,CO,DN,US 2024-01-20 16:40:23,Utah Jazz,UT,SLC,US Expected output
2023-08-01,Lakers,CA,US
cut -d, -f1,2,3,5 awk -F',' '{ print $1,$2,$3,$5 }'
Источник: https://stackoverflow.com/questions/780 ... delimiters
Мобильная версия