#! /usr/bin/env bash # motivated by # TODO # upport some sort of caching # example test1 for friend1, test2 for friend2 and test for friend1 and friend2 QUERY="?action=search&q=fmt%3D%23simple+" # PmWiki format KEYWORD=$1 URList=("http://nicolas.bigand.free.fr/pmwiki/index.php5" "http://notes.franck-brignoli.fr/") # all Pmwiki instances for URL in "${URList[@]}" # this should be limited to people with expertize in the topic do curl "${URL}${QUERY}${KEYWORD}" | awk /wikisearch/,/searchinfostart/ | grep wikilink | sed "s/.*href='\(.*\)'.*/\1/" | sort | uniq # parsing is only done for PmWiki now done