📅  最后修改于: 2022-03-11 14:50:07.402000             🧑  作者: Mango
# Getting http://some/site/*my_pattern*
SITE="http://some/site/"
PATTERN="my_pattern"
wget -nv -O- $SITE |
grep $PATTERN |
awk -v pat=$PATTERN -F '"' '{ for (i=1; i<=NF; ++i) { if ($i ~ pat) print $i } }' |
while read x; do
if [[ ! $x = ">" ]] ; then
wget $SITE$x &>/dev/null
echo $x
fi