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

EXAMPLES

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

EXIT STATUS

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

SEE ALSO

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

AUTHOR

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