#!/bin/bash declare -i MP declare -i MPP if [[ -n $1 ]]; then echo "Last line of file specified as non-opt/last argument:" echo "$1" MP=$1-1 MPP=$1+1 for i in $(seq $MP $MPP); do curl -s -o "./missions/$i.html" "https://www.leitstellenspiel.de/einsaetze/$i" html2text -utf8 -style pretty -width 100 -o "./missions/$i.text" "./missions/$i.html" lynx --dump "./missions/$i.html" >"./missions/$i.txt" sleep 2 done php ./parse_html.php php ./gen_js.php php ./gen_missionjs.php fi