#! /bin/bash # cflow-to-vcg interface. # Copyright 2002 Junichi Uekawa # created on 21 June 2002. # Under GPL version 2 or later. TF=$(tempfile) pre=$(tempfile) post=$(tempfile) cflow -n "$@" > "$TF" (cat $TF | cut -f1 ; cat $TF | cut -f2) | sort | uniq | sed 's/^\(.*\)$/node: { title: "\1" label: "\1" }/' > "$pre" cat $TF | sort | sed 's/^\([^ ]*\) \([^ ]*\).*$/edge: { sourcename: "\1" targetname: "\2" class: 2}/' > "$post" cat <