extract_iata.sh 234 B

1234567
  1. d=$(dirname $0)
  2. cat $d/../hosts \
  3. | grep -oP '(?<=sn\-)([a-z0-9]{3})(?=([a-z0-9]{5}\.))' \
  4. | sort -u \
  5. | xargs -i sh -c "$d/conv.py -s {}; echo {}" \
  6. | paste -d' ' - - \
  7. | sort -k1 -u - $d/../data/iata.txt -o $d/../data/iata.txt