Created
June 13, 2011 22:26
-
-
Save nietaki/1023884 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -le 1 ] | |
then | |
exit 1 | |
fi | |
echo '' > tmp1.tmp | |
echo '' > tmp2.tmp | |
curaddr=$1 | |
curout='tmp1.tmp' | |
page=1 | |
echo 'dupa' > tmp.tmp | |
while [ "$(cat tmp.tmp | wc -l)" != '0' ] | |
do | |
wget -q $curaddr?p\=$page -O tmp.html | |
cat tmp.html | grep -o "http://steamcommunity.com/id/[^\ \"\\']*" | uniq > tmp.tmp | |
cat tmp.html | grep -o "http://steamcommunity.com/profiles/[0-9]*" | uniq >> tmp.tmp | |
cat tmp.tmp >> $curout | |
let "page++" | |
done | |
curaddr=$2 | |
curout='tmp2.tmp' | |
page=1 | |
echo 'dupa' > tmp.tmp | |
while [ "$(cat tmp.tmp | wc -l)" != '0' ] | |
do | |
wget -q $curaddr?p\=$page -O tmp.html | |
cat tmp.html | grep -o "http://steamcommunity.com/id/[^\ \"\\']*" | uniq > tmp.tmp | |
cat tmp.html | grep -o "http://steamcommunity.com/profiles/[0-9]*" | uniq >> tmp.tmp | |
cat tmp.tmp >> $curout | |
let "page++" | |
done | |
echo dupa | |
cat tmp1.tmp > razem.tmp | |
cat tmp2.tmp >> razem.tmp | |
cat razem.tmp | sort | uniq > wspolni.tmp | |
echo | |
echo | |
echo $1 ma następujących unikalnych userów: | |
echo | |
cat tmp1.tmp wspolni.tmp | sort | uniq -u | |
echo | |
echo | |
echo a za to $2 ma następujących unikalnych userów: | |
echo | |
cat tmp2.tmp wspolni.tmp | sort | uniq -u |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment