@@ 12,7 12,7 @@ else
echo "Failed!"
exit 1
fi
-MAX_PAGE=$(fgrep last_page ${POST_ID}.1.rp | perl -pe 's/.+(\d+)\S+;per_page=\d+\S+Last.*/\1/; print; exit')
+MAX_PAGE=$(fgrep last_page ${POST_ID}.1.rp | perl -pe 's/.+\D(\d+)\S+;per_page=\d+\S+Last.*/\1/; print; exit')
if (( MAX_PAGE \> 1 )); then
seq 2 ${MAX_PAGE} > ${POST_ID}.index
echo "Done!"
@@ 24,11 24,11 @@ if (( MAX_PAGE \> 1 )); then
if [ -f ${POST_ID}.${PAGE}.rp ]; then
echo -n "."
else
- echo "Failed! ${POST_ID}.${PAGE}.rp not found,"
+ echo " Failed! ${POST_ID}.${PAGE}.rp not found,"
exit 1
fi
done
- echo "Done!"
+ echo " Done!"
echo -n "Cleaning index ... ";
rm ${POST_ID}.index
echo "Done!"