asdf-python/bin/list-all
2016-05-14 11:36:56 +09:00

11 lines
305 B
Bash
Executable file

#!/usr/bin/env bash
list_all() {
local http_endpoint="https://www.python.org/ftp/python/"
local extract_regexp='s|<a href="([0-9](\.[0-9]){1,2})/".*|\1|p'
local black_list='2.0'
curl -s $http_endpoint | sed -E -ne "$extract_regexp" | grep -vE "^($black_list)$" | tr '\n' ' '
}
list_all