#!/usr/bin/env bash

for year in /root/Downloads/data/all/*

do
echo -ne `basename $year .gz`"\t"
gunzip -c $year | \
awk '{ temp = substr($0, 88, 5) + 0;
      q = substr($0, 93, 1);
      if (temp != 9999 && q ~ /[01459]/ && temp > max) max = temp }
END { print max }`
done

#!/usr/bin/env bash
for year in all/*
do
   echo -ne `basename $year .gz`"\t"
   gunzip -c $year | \
     awk '{ temp = substr($0, 88, 5) + 0;
            q = substr($0, 93, 1);
            if (temp !=9999 && q ~ /[01459]/ && temp > max) max = temp }
          END { print max }'
done

相关文章:

  • 2021-07-12
  • 2021-05-14
  • 2021-10-05
  • 2021-04-03
  • 2022-12-23
  • 2021-12-10
  • 2021-11-30
猜你喜欢
  • 2022-02-10
  • 2022-01-22
  • 2021-06-29
  • 2022-01-07
  • 2022-01-29
  • 2022-01-15
  • 2021-11-30
相关资源
相似解决方案