GC(1)

okay so bestie, this is the GC(1) page from the General Commands Manual β€” header folded in, vibe check passed, let’s go πŸ’…

🌸 NAME 🌸

gc β€” count graph components. not me being obsessed with a tiny graph counter, but here we are πŸ’–

✨ SYNOPSIS ✨

gc [ -necCaDUrsv?  ] [ files ]

πŸ¦‹ DESCRIPTION πŸ¦‹

so 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. and if more than one graph is given, it also prints a total count for all graphs β€” no cap, that’s literally the whole gig πŸ¦‹

πŸ’… OPTIONS πŸ’…

the following options are supported, bestie:

  • -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, case insensitively, with "cluster" or who has the cluster=true attribute. πŸ‘‘
  • -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. 🌈
  • -v β€” verbose output. πŸ’œ
  • -? β€” print usage information. 😭

by default, gc returns the number of nodes and edges. periodt. πŸ’…

πŸŽ€ 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. πŸ’€

fr fr, that -E is right there in the text β€” we don’t fix man pages in this chat, we just report them with love.

πŸ‘‘ AUTHOR πŸ‘‘

give it up for Emden R. Gansner <erg@research.att.com> πŸ‘‘ β€” icon behavior, honestly.

🌈 SEE ALSO 🌈

go read these next, bestie β€” iykyk:

mwah πŸ’‹ β€” that’s the GC(1) page from the General Commands Manual, dated 21 March 2001, signing off with main-character energy. periodt. 🫢

πŸ“¦ where this page comes from