LinuxCommandLibrary

gvpr

graph stream editor, similar to awk for graphs

TLDR

Run gvpr script

$ gvpr -f [script.gvpr] [input.gv]
copy
Inline program
$ gvpr 'N[color=="red"]' [input.gv]
copy
Output to file
$ gvpr -o [output.gv] -f [script.gvpr] [input.gv]
copy
Select nodes by attribute
$ gvpr 'N[degree>3]' [graph.gv]
copy

SYNOPSIS

gvpr [options] program [files]

DESCRIPTION

gvpr is a graph stream editor, similar to awk for graphs. It processes Graphviz graphs using a pattern-action programming language.
The tool can filter, transform, and analyze graphs. It supports node and edge selection, attribute manipulation, and graph restructuring.

PARAMETERS

PROGRAM

Gvpr program or expression.
FILES
Input DOT files.
-f FILE
Read program from file.
-o FILE
Output file.
-c
Check syntax only.
-i
Print node info.
-V
Verbose mode.
-?
Display help information.

CAVEATS

Part of Graphviz package. Learning curve for programming language. Complex operations can be slow.

HISTORY

gvpr was developed as part of Graphviz at AT&T Labs to provide AWK-like processing for graph structures.

SEE ALSO

dot(1), awk(1), gc(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community