Unix and Linux Discussions Tagged with prune |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
4 |
17,536 |
Shell Programming and Scripting |
|
|
|
4 |
3,154 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
4,152 |
Shell Programming and Scripting |
|
|
|
9 |
9,872 |
Shell Programming and Scripting |
|
|
|
1 |
303,195 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
6,186 |
UNIX for Dummies Questions & Answers |
|
|
|
15 |
4,692 |
Shell Programming and Scripting |
|
|
|
0 |
1,308 |
Software Releases - RSS News |
|
|
|
0 |
2,103 |
MySQL DevZone RSS |
|
|
|
9 |
25,175 |
Shell Programming and Scripting |
|
|
|
1 |
12,039 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,924 |
UNIX for Dummies Questions & Answers |
|
|
|
7 |
25,621 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
1,881 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
30,761 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
5,042 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
112,859 |
UNIX for Dummies Questions & Answers |
prune(1) General Commands Manual prune(1)
NAME
prune - Prune directed graphs
SYNOPSIS
prune [ -n node ] [ -N attrspec ] [ files ... ]
DESCRIPTION
prune reads directed graphs in the same format used by dot(1) and removes subgraphs rooted at nodes specified on the command line via
options. These nodes themselves will not be removed, but can be given attributes so that they can be easily located by a graph stream edi-
tor such as gvpr(1). prune correctly handles cycles, loops and multi-edges.
Both options can appear multiple times on the command line. All subgraphs rooted at the respective nodes given will then be processed. If a
node does not exist, prune will skip it and print a warning message to stderr. If multiple attributes are given, they will be applied to
all nodes that have been processed. prune writes the result to the stdout.
OPTIONS
-n name
Specifies name of node to prune.
-N attrspec
Specifies attribute that will be set (or changed if it exists) for any pruned node. attrspec is a string of the form attr=value.
EXAMPLES
An input graph test.dot of the form
digraph DG {
A -> B;
A -> C;
B -> D;
B -> E;
}
, processed by the command
prune -n B test.dot
would produce the following output (the actual code might be formatted in a slightly different way).
digraph DG {
A -> B;
A -> C;
}
Another input graph test.dot of the form
digraph DG {
A -> B;
A -> C;
B -> D;
B -> E;
C -> E;
}
(note the additional edge from C to E ), processed by the command
prune -n B -N color=red test.dot
results in
digraph DG {
B [color=red];
A -> B;
A -> C;
C -> E;
}
Node E has not been removed since its second parent C is not being pruned.
EXIT STATUS
prune returns 0 on successful completion. It returns 1 if an error occurs.
SEE ALSO
dot(1), gvpr(1)
AUTHOR
Marcus Harnisch <marcus.harnisch@gmx.net>
prune(1)