Keep only monthly data:
$ cat downloads_all | grep -B1 -A1 --no-group-separator \
- -E '^output = ".*/monthly/[0-9]*.xml"$' > downloads_monthly
+ -E '^output = ".*/monthly/[A-Z0-9]{7}.xml"$' > downloads_monthly
Remove all downloads before (restart interrupted download):
$ sed -n '/https:\/\/climate.weather.gc.ca\/climate_data\/bulk_data_e.html?format=xml&timeframe=3&stationID=2606/,$p' \