This repository has been archived on 2024-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
asdf-python/bin/list-all
2016-05-13 15:53:24 +09:00

11 lines
302 B
Bash
Executable file

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