_get_litero_html_from_url () 
{ 
    [ -z "$litfile" ] && echo "litfile var not set.";
    [ -z "$url" ] && echo "url not set";
    wget "$url" --output-document="$litfile"
}

_get_pgs_from_litero_url () 
{ 
    _get_litero_html_from_url;
    _get_pgs_from_litero_html;
    echo $pgs
}

_get_pgs_from_litero_html () 
{ 
    cat $litfile | grep --color=auto -i -e "[0-9]* page\(s\)\?" -o | grep --color=auto -e "[0-9]*" -o > pgs && pgs=$(cat pgs);
    rm pgs
}
