fork download
  1. #!/bin/bash
  2. s='https://s...content-available-to-author-only...n.tld/[...]
  3. https://s...content-available-to-author-only...n.tld/test/[...]
  4. https://s...content-available-to-author-only...n.tld/[...]
  5. https://s...content-available-to-author-only...n.tld/files/[...]'
  6. sed -En 's~https?://([[:alnum:]-]+)\.stage\.domain\.tld.*~\1~p' <<< "$s"
Success #stdin #stdout 0s 4516KB
stdin
Standard input is empty
stdout
subdomain1
subdomain2