#!/bin/bash idx=$(awk 'BEGIN { srand(); print int(rand()*81) }') chapter=$(expr $idx + 1) echo "$chapter" echo filename="http://dailytao.org/dailytao-org-wdgt-1.1.php?index=" curl -s "$filename$idx" | sed 's/
//g;'