asdf-python/bin/list-all

12 lines
305 B
Text
Raw Normal View History

2016-04-24 10:28:48 +01:00
#!/usr/bin/env bash
list_all() {
local http_endpoint="https://www.python.org/ftp/python/"
2016-05-13 08:12:33 +01:00
local extract_regexp='s|<a href="([0-9](\.[0-9]){1,2})/".*|\1|p'
2016-05-13 07:53:24 +01:00
local black_list='2.0'
2016-04-24 10:28:48 +01:00
2016-05-13 08:12:33 +01:00
curl -s $http_endpoint | sed -E -ne "$extract_regexp" | grep -vE "^($black_list)$" | tr '\n' ' '
2016-04-24 10:28:48 +01:00
}
list_all