# Last edited on 2017-05-15 01:00:34 by stolfilocal # Building a table of CNY-USD conversion rate. # Copied historic data from https://www.investing.com/currencies/usd-cny-historical-data # Manually converted dates from "Mmm dd, yyyy" to "yyyy-mm-dd" and # removed columns "Open" and "Change%". Replaced tabs by " | " # inserted time "00:00:00" after each date. # Checking whether the Price is always between "High" and "Low": gawk 'BEGIN { n = 0; } /^ *20/ { pr=$4+0; hi=$6+0; lo=$8+0; \ if ((pr==0)||(hi==0)||(lo==0)||(pr>hi)||(pr "/dev/stderr"; exit(1); } \ n++; \ } \ END { printf "%d lines", n > "/dev/stderr"; } \ '