Skip to content

Instantly share code, notes, and snippets.

@joefutrelle
Created July 22, 2014 18:02
Show Gist options
  • Save joefutrelle/60a85d62429d85bbeb12 to your computer and use it in GitHub Desktop.
Save joefutrelle/60a85d62429d85bbeb12 to your computer and use it in GitHub Desktop.
take a file where each line is "state action state" and turn it into a Graphviz .dot file
#!/bin/sed -e
1i digraph foo {
s/\([[:alnum:]]*\) \([[:alnum:]]*\) \([[:alnum:]]*\)/\1 -> \3 [label="\2"];/
$a }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment