Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gc(1) [debian man page]

GC(1)							      General Commands Manual							     GC(1)

NAME
gc - count graph components SYNOPSIS
gc [ -necCaDUrs? ] [ files ] DESCRIPTION
gc is a graph analogue to wc in that it prints to standard output the number of nodes, edges, connected components or clusters contained in the input files. It also prints a total count for all graphs if more than one graph is given. OPTIONS
The following options are supported: -n Count nodes. -e Count edges. -c Count connected components. -C Count clusters. By definition, a cluster is a graph or subgraph whose name begins with "cluster". -a Count all. Equivalent to -encC -r Recursively analyze subgraphs. -s Print no output. Only exit value is important. -D Only analyze directed graphs. -U Only analyze undirected graphs. -? Print usage information. By default, gc returns the number of nodes and edges. OPERANDS
The following operand is supported: files Names of files containing 1 or more graphs in dot format. If no files operand is specified, the standard input will be used. EXIT STATUS
The following exit values are returned: 0 Successful completion. 1 The -U or -E option was used, and a graph of the wrong type was encountered. AUTHOR
Emden R. Gansner <erg@research.att.com> SEE ALSO
wc(1), acyclic(1), gvpr(1), gvcolor(1), ccomps(1), sccmap(1), tred(1), libgraph(3) 21 March 2001 GC(1)

Check Out this Related Man Page

SCCMAP(1)                                                     General Commands Manual                                                    SCCMAP(1)

NAME
sccmap - extract strongly connected components of directed graphs SYNOPSIS
sccmap [-dsv] [ -ooutfile ] [ files ] DESCRIPTION
sccmap decomposes digraphs into strongly connected components and an auxiliary map of the relationship between components. In this map, each component is collapsed into a node. The resulting graphs are printed to standard out. The number of nodes, edges and strongly con- nected components are printed to standard error. sccmap is a way of partitioning large graphs into more manageable pieces. OPTIONS
The following options are supported: -d Preserve degenerate components of only one node. -s Do not print the resulting graphs. Only the statistics are important. -S Just print the resulting graphs. No statistics are printed. -ooutput Prints output to the file output. If not given, sccmap uses stdout. -v Generate additional statistics. In particular, sccmap prints the number of nodes, edges, connected components, and strongly con- nected components, followed by the fraction of nodes in a non-trivial strongly connected components, the maximum degree of the graph, and fraction of non-tree edges in the graph. OPERANDS
The following operand is supported: files Names of files containing 1 or more graphs in dot format. If no files operand is specified, the standard input will be used. DIAGNOSTICS
sccmap emits a warning if it encounters an undirected graph, and ignores it. AUTHORS
Stephen C. North <north@research.att.com> Emden R. Gansner <erg@research.att.com> SEE ALSO
gc(1), dot(1), acyclic(1), gvpr(1), gvcolor(1), ccomps(1), tred(1), libgraph(3) 21 March 2001 SCCMAP(1)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Count incrementation

:confused: Hi everyone, I need help with what is probably very simple but I keep missing my mistake. My shell program looks for specific files saved on the server. I have a separate file which will keep a count for when the files are found If the files is found, I want to add 1 to... (4 Replies)
Discussion started by: itldp
4 Replies

2. UNIX for Dummies Questions & Answers

Line Count Calculations

Hi, I have a log file and I have to find the preveous versions line count and current version's line count I assinged preLC and curLC as bellow. I am unable to substract from preLC-curLC, If I do the same in comand prompt I am able to see the o/p: like : $ cat ARBLOGNODE1.TEMPlinecount | awk... (4 Replies)
Discussion started by: redlotus72
4 Replies

3. Shell Programming and Scripting

Count of files based on date?

Hi Friends, Can anyone help me with this: To get the count of files that are existing in a directory created on a perticular date like in the example (01/08) .(having same pattern for the filename) ex: FileName Creted Date FILE001 01/08/2007 FILE005 ... (6 Replies)
Discussion started by: sbasetty
6 Replies

4. Shell Programming and Scripting

Count if numbers are not repetitive

Hi All, I have an input below and i would want to do a count on all the term "aaa" and count only once if the number in first column is the same. For eg, if i use a "grep -c aaa input" command, the count will be "8". However, i would want the count to be "6" instead since 2 numbers in the 1st... (7 Replies)
Discussion started by: Raynon
7 Replies

5. Shell Programming and Scripting

Parsing File

I have input file like Count(*) TableName ----------- ------------------------------ 1 ccc_customers Count (*)TableName ----------- ------------------------------ 1 ccc_conduit_gci , I want to take only lines with 1 starting letter and removeing the 1 and spaces OUTPUT... (8 Replies)
Discussion started by: scorp_rahul23
8 Replies

6. Shell Programming and Scripting

Getting Sum, Count and Distinct Count of a file

Hi all this is a UNIX question. I have a large flat file with millions of records. col1|col2|col3 1|a|b 2|c|d 3|e|f 3|g|h footer**** I am supposed to calculate the sum of col1 1+2+3+3=9, count of col1 1,2,3,3=4, and distinct count of col1 1,2,3=c3 I would like it if you avoid... (4 Replies)
Discussion started by: singhabhijit
4 Replies

7. IP Networking

processing tcpflow output

I'm using tcpflow to analyze traffic traces. When I launch tcpflow with -r option it creates some files, one for each flow. The problem is that some of these files are not readable. I tryed to process them with awk, but also using it i cannot visualize them correctly. Can anyone suggest me a... (5 Replies)
Discussion started by: littleboyblu
5 Replies

8. UNIX for Dummies Questions & Answers

create graph with detail info

hey, i want to create a graph. The graph should show how many IPs are connected to a pool. But the graph should also show which IPs are connected. Does anyone know a tool which is able to do that? I already worked with PNP but I think this can't work because of rrd. (6 Replies)
Discussion started by: vostro
6 Replies

9. Shell Programming and Scripting

Count the delimeter from a file and delete the row if delimeter count doesnt match.

I have a file containing about 5 million rows, in the file there are some records which has extra delimiter at random position. (we dont know the positions), now we have to Count the delimeter from each row and if the count of delimeter is not matching then I want to delete those rows from the... (5 Replies)
Discussion started by: Akumar1
5 Replies

10. Shell Programming and Scripting

Count

Hi All, i am new to unix scripting,i need a help Actually i want to take the count of two variables from a file.And i want to write that to another file. can you please help me in this. (6 Replies)
Discussion started by: ratheeshkulavil
6 Replies

11. UNIX for Dummies Questions & Answers

Count Number Of lines in text files and append values to beginning of file

Hello, I have 50 text files in a directory called "AllFiles" I want to make a program that will go inside of the "AllFiles" Directory and count the number of lines in each individual text file. Then, the program will calculate how many more lines there are over 400 in each text file and... (7 Replies)
Discussion started by: motoxeryz125
7 Replies

12. UNIX for Dummies Questions & Answers

File Row Line Count without Header Footer

Hi There! I am saving the file count of all files in a directory to an output file using: wc -l * > FileCount.txt I get: 114 G4SXORD 3 G4SXORH 0 G4SXORP 117 total But this count includes header and footer. I want to subtract 2 from the count and get ... (7 Replies)
Discussion started by: gagan8877
7 Replies

13. Shell Programming and Scripting

Count & Result

Hi All. I'm trying to count with command cat Count.log |sort -t 1 | uniq -c Input File. Back-end Invalid Id Password Back-end Invalid Id Password Success Success Success Back-end Invalid Id Password Back-end User state is invalid Back-end User state is invalid Success... (9 Replies)
Discussion started by: ooilinlove
9 Replies

14. Shell Programming and Scripting

Help for Count number of files in certain time

Chaps, I need to count number of files in a remote directory from Linux (FreeBSD) as if 10 trace files (log files) been generated within 5min of time. So this is the script then I can setup a monitoring. I came across with ls -1 \ip\d:\Logs | wc -l but then what else requires to check time... (8 Replies)
Discussion started by: samwijekoon
8 Replies

15. Shell Programming and Scripting

Count consecutive characters

Need to count consecutive characters in a string and give the output as below i/p=aaaabbcaa o/p=a4b2c1a2 (10 Replies)
Discussion started by: prasanna2166
10 Replies