#!/bin/bash
#set -x
#allid=`curl http://xx/wiki/children.json?pageid=$1 2>/dev/null |awk -F "[" '{print $2}'|sed 's/{/\n/g'|awk -F',' '{print $4,$6}'|awk -F : '{print $3}'`
listwiki()
{
curl http://xx/wiki/children.json?pageid=$1 2>/dev/null |awk -F "[" '{print $2}'|sed 's/{/\n/g'|awk -F',' '{print $4,$6}'
allid=`curl http://xx/wiki/children.json?pageid=$1 2>/dev/null |awk -F "[" '{print $2}'|sed 's/{/\n/g'|awk -F',' '{print $4,$6}'|awk -F: '{print $3}'`
for i in $allid
do
listwiki $i
done
}
listwiki $1