HXCOUNT(1)
๐ HXCOUNT(1) ๐
okay bestie, welcome to hxcount โ she's part of the HTML-XML-utils squad and she's here to count your stuff. literally her whole thing. no cap.
โจ NAME โจ
hxcount โ count elements and attributes in HTML or XML files ๐งฎ๐
๐ธ SYNOPSIS ๐ธ
hxcount [ file-or-URL ]
๐ฆ DESCRIPTION ๐ฆ
okay so here's the vibe: hxcount goes through your input, counts up how many elements and attributes of each type show up, and then prints a whole lil report on stdout. that's it. that's the gig. and honestly? iconic. ๐
๐ OPERANDS ๐
she supports exactly one (1) operand, and it's this one:
file-or-URLโ the name or the URL of an HTML or XML file. and if you don't give her one? no worries, she just reads from standard input instead. lowkey flexible of her fr fr ๐ซถ
๐ EXIT STATUS ๐
the exit values she returns, bestie:
0โ successful completion. we love a clean win โจ> 0โ an error happened while parsing the HTML or XML file ๐ญ. but listen โhxcountwill try to recover from the error and produce output anyway. she's a fighter. she's giving main character energy.
๐ ENVIRONMENT ๐
wanna pull remote files through a proxy? set the environment variables http_proxy and ftp_proxy. like, for example:
http_proxy="http://localhost:8080/"
that's it, that's the whole thing ๐
๐ BUGS ๐
don't trust the output if there were errors in the input. seriously. do NOT. ๐จ
- remote files (the ones you specify with a URL) are currently only supported for HTTP. that's it. that's the list.
- password-protected files, or files that depend on HTTP "cookies", are not handled at all. not even a little bit. (but you can use tools like
curl(1)orwget(1)to grab those files yourself โ slay, workaround queen ๐ )
๐ SEE ALSO ๐
asc2xml(1), hxprune(1), hxnormalize(1), hxnum(1), hxtoc(1), hxunent(1), xml2asc(1), UTF-8 (RFC 2279)
go read those too, they're the rest of the friend group ๐ฆโจ
k bye, this was version 7.x, dated 10 Jul 2011 โ she's been serving since 2011 and she still eats ๐๐
๐ฆ where this page comes from
- alpine 3.24: html-xml-utils-doc 8.7-r0 ยท W3C
- arch rolling: html-xml-utils 8.8-1 ยท W3C
- debian bookworm: html-xml-utils 7.7-1.1 ยท W3C
- debian trixie: html-xml-utils 7.7-1.1+b1 ยท W3C
- fedora 43: html-xml-utils 8.6-2.fc41 ยท W3C AND BSD-3-Clause
- fedora 44: html-xml-utils 8.7-1.fc44 ยท W3C AND BSD-3-Clause
- nixos 26.05: html-xml-utils 8.7
- nixpkgs unstable: html-xml-utils 8.7
- opensuse-leap 16.0: html-xml-utils 8.6-bp160.1.12 ยท W3C
- opensuse-leap 16.0: html-xml-utils 8.6-bp160.1.12 ยท W3C
- opensuse-leap 16.0: html-xml-utils 8.6-bp160.1.12 ยท W3C
- opensuse-leap 16.0: html-xml-utils 8.6-bp160.1.12 ยท W3C
- ubuntu jammy: html-xml-utils 7.7-1.1 ยท W3C
- ubuntu noble: html-xml-utils 7.7-1.1build2 ยท W3C
- ubuntu questing: html-xml-utils 7.7-1.1build2
- ubuntu resolute: html-xml-utils 7.7-1.3 ยท W3C
- ubuntu stonking: html-xml-utils 7.7-1.3 ยท W3C
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms