1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/sh mkdir -p chapters/ cat book-list | while read buch do mkdir -p "chapters/$buch" ./parse-chapter.sed "books/$buch" | \ while read url do read number echo $url echo "$buch $number" curl $url > "chapters/$buch/$number" done done