Skip to main content
1 of 3
aborruso
  • 3k
  • 14
  • 31

With Miller (http://johnkerl.org/miller/doc), using

mlr --ocsv --quote-all --inidx --ifs , cat a22.txt | \
mlr --opprint --icsvlite stats1 -g '"1"' -a min,max -f '"2","3"' \
then cut -f '"1","2"_min,"3"_max' \
then label id,col2,col3

you have

id        col2     col3
"0164318" "001449" "001457"
"0842179" "002115" "002118"
"0846354" "001512" "001513"
"0841422" "001221" "001228"
aborruso
  • 3k
  • 14
  • 31