Mercurial > buddylistgrapher
view graph.sh @ 2:6c327ae23d2c
added --help to shell edition
some cleanups
author | meillo@marmaro.de |
---|---|
date | Mon, 28 May 2007 20:03:27 +0200 |
parents | 21d9547ef242 |
children |
line wrap: on
line source
#!/bin/bash # # Autor: Julian Forster # www.ProgMaschine.de.vu # # if [ $# -eq 1 ]; then file=/tmp/`basename $0`-$$ grep -e "Profil von:" -e "Nachricht schreiben" $1 > $file echo "digraph G {" cat $file | while read line ; do isProfil=`echo $line | grep "Profil von:"` if [ -n "$isProfil" ] ; then name=$(echo $line | awk '{ print $3 }') else buddy=$(echo $line | awk '{ print $3 }') echo "\"$name\" -> \"$buddy\";" fi done echo "}" exit 0 else echo "" exit 1 fi