#!/bin/sh
squidcache_path="/var/squid/cache"
squidclient_path="/opt/squid/bin/squidclient"
grep -a -r $1 $squidcache_path/* | strings | grep "http:" | awk -F'http:' '{print "http:"$2;}' > cache_list.txt
for url in `cat cache_list.txt`; do
$squidclient_path -m PURGE -h xxxxxxx -p 80 $url
done