Mercurial > buddylistgrapher
comparison graph3.sh @ 6:e34b27b544b5
completed sed variant
author | meillo@marmaro.de |
---|---|
date | Sat, 09 Jun 2007 00:05:36 +0200 |
parents | b82703cc3dd4 |
children |
comparison
equal
deleted
inserted
replaced
5:2f455fc82355 | 6:e34b27b544b5 |
---|---|
43 | 43 |
44 | 44 |
45 # TODO: fetch only edges for people having a profile | 45 # TODO: fetch only edges for people having a profile |
46 | 46 |
47 # output | 47 # output |
48 echo "digraph G {" | |
49 | 48 |
50 sed -n -e ' | 49 sed -n -e ' |
51 /^Profil/{ | 50 /^Profil/{ |
52 s/Profil von: \(.\+\)/"\1"/ | 51 s/Profil von: \(.\+\)/"\1";/ |
52 w /tmp/aa | |
53 s/;$// | |
53 h | 54 h |
54 #p | 55 #p |
55 } | 56 } |
56 | 57 |
57 | 58 |
60 s/ - [-0-9]\+// | 61 s/ - [-0-9]\+// |
61 s/Nachricht schreiben \(.\+\)\n/"\1" / | 62 s/Nachricht schreiben \(.\+\)\n/"\1" / |
62 s/"\(.\+\)" "\(.\+\)"/ "\2" -> "\1";/ | 63 s/"\(.\+\)" "\(.\+\)"/ "\2" -> "\1";/ |
63 | 64 |
64 # write out | 65 # write out |
65 p | 66 #p |
67 w /tmp/bb | |
66 } | 68 } |
67 ' $1 | 69 ' $1 |
68 | 70 |
69 | 71 echo "digraph G {" |
72 grep -f /tmp/aa /tmp/bb | |
70 echo "}" | 73 echo "}" |
71 | 74 |
72 # rm $file $file2 | 75 # rm $file $file2 |
73 exit 0 | 76 exit 0 |
74 | 77 |