#!/bin/sh for i in $(grep works/[0-9]\* $@ -o | uniq | sed 's/works\///g' | sed '/^$/d') do aria2c https://download.archiveofourown.org/downloads/$i/\*.epub done