1 2 3 4 5 6
#! /usr/bin/env bash set -e grep -e 'URIs:' /etc/apt/sources.list.d/debian.sources | \ sed -E 's|URIs:\s*https?://([-_.a-zA-Z0-9]+)/.*|\1|;q'