#!/bin/bash # (c) 2000 Rajo & Nepto # $Platon: akt-atlusers.sh,v 1.2 2002/02/04 15:04:46 host8 Exp $ rm -f who.cgi # Parameter '-q' znamena quiet mode. # Bez neho wget posiela na stderr kopu zbytocnych textov. wget --proxy=off -q http://www.atlantis.sk/cgy/who.cgi sleep 10 if [ -e who.cgi ]; then cat who.cgi | sed '1,187d; s/<\/FONT>//g; s/>/>/g;s/</ who.txt riadkov=`wc -l who.txt |awk '{print $1}' ` odrezat=`expr $riadkov - 20` datum=`date "+%s"` sed "${odrezat},${riadkov}d; s/^| \(.*\) \(.*\)| \([A-Z]*\) | \(.*\)|\([ ]*\)\([0-9]*\)\/\([0-9]*\)\([ ]*\) |$/\1 \6/g; s/^\([a-zA-Z]*\) \(.*\) \([0-9]*\)$/${datum} \1 \3/g" who.txt | awk '{ print $1 " " $2 " " $3*60 }' rm -f who.cgi rm -f who.txt fi