1prune(1)                    General Commands Manual                   prune(1)
2
3
4

NAME

6       prune - Prune directed graphs
7

SYNOPSIS

9       prune [ -n node ] [ -N attrspec ] [ -v ] [ -(h|?)  ] [ files ...  ]
10

DESCRIPTION

12       prune  reads  directed  graphs  in  the  same format used by dot(1) and
13       removes subgraphs rooted at nodes specified on  the  command  line  via
14       options.  These  nodes themselves will not be removed, but can be given
15       attributes so that they can be easily located by a graph stream  editor
16       such  as  gvpr(1).   prune  correctly  handles cycles, loops and multi‐
17       edges.
18
19       Both options can appear multiple times on the command  line.  All  sub‐
20       graphs  rooted at the respective nodes given will then be processed. If
21       a node does not exist, prune will skip it and print a  warning  message
22       to  stderr.   If multiple attributes are given, they will be applied to
23       all nodes that have been processed.  prune writes  the  result  to  the
24       stdout.
25

OPTIONS

27       -n name
28              Specifies name of node to prune.
29
30       -N attrspec
31              Specifies  attribute  that will be set (or changed if it exists)
32              for  any  pruned  node.   attrspec  is  a  string  of  the  form
33              attr=value.
34
35       -v     Verbose output.
36
37       -h -?  Prints the usage and exits.
38
39

EXAMPLES

41       An input graph test.gv of the form
42
43            digraph DG {
44              A -> B;
45              A -> C;
46
47              B -> D;
48              B -> E;
49            }
50
51       , processed by the command
52
53            prune -n B test.gv
54
55       would  produce the following output (the actual code might be formatted
56       in a slightly different way).
57
58            digraph DG {
59              A -> B;
60              A -> C;
61            }
62
63       Another input graph test.gv of the form
64
65            digraph DG {
66              A -> B;
67              A -> C;
68
69              B -> D;
70              B -> E;
71
72              C -> E;
73            }
74
75       (note the additional edge from C to E ), processed by the command
76
77            prune -n B -N color=red test.gv
78
79       results in
80
81            digraph DG {
82              B [color=red];
83              A -> B;
84              A -> C;
85              C -> E;
86            }
87
88       Node E has not been removed since its second  parent  C  is  not  being
89       pruned.
90
91

EXIT STATUS

93       prune  returns  0  on  successful completion.  It returns 1 if an error
94       occurs.
95

SEE ALSO

97       dot(1), gvpr(1)
98
99

AUTHOR

101       Marcus Harnisch <marcus.harnisch@gmx.net>
102
103
104
105                                                                      prune(1)
Impressum