UNHTML(1)
π unhtml(1) β the general commands manual, but make it cute π
okay bestie, gather round, because unhtml is literally the moment π«Ά it's a little command that lives in section 1 of the manual (yep, the general commands manual, iykyk), and it does exactly one thing but it does it so well.
β¨ NAME β¨
unhtml β strip the HTML formatting from a document or the standard input stream and display it to the standard output
like. it takes the html away. that's the whole job. and honestly? iconic.
πΈ SYNOPSIS πΈ
unhtml -version | [ filename ]
that's it. that's the whole vibe. either you ask it for its version, or you hand it a filename. no in-between, no chaos. π
π¦ DESCRIPTION π¦
so here's the tea: unhtml parses text that it reads from the standard input β or from a file, if you gave it a filename β and it removes any HTML formatting it finds in there. bye bye tags. not a crumb left. π§
then it prints the resulting cleansed text to the standard output, which is perfect for easy redirection. you want it in a file? redirect it. you want it piped somewhere? pipe it. it's giving flexible, honestly.
and listen β the version included with this man page has been improved to handle comments and scripts. so it's not out here getting fooled by <!-- ... --> or <script> blocks. no cap, it ate that. π₯
π OPTIONS π
-versionβ Version.unhtmlwill display its version and exit. that's it, that's the one option, and it's a diva about it π
β EXAMPLES β
okay so this example simply scans a file called "index.html" and prints the file to the standard output with the HTML formatting removed. the standard output is redirected to a file called "index.txt", which β after running β will contain the plain text of the .html file. slay. β¨
example% unhtml index.html > index.txt
look at that little redirect go. main character energy. π
π BUGS π
currently, if the output is redirected to a file of the same name as the input file, the result will be an empty file of the same name π
but bestie, this is really an idiosyncracy of the redirect operator, and it cannot be corrected in the program. so like. not our girl's fault. the redirect did that. π
π DEVELOPMENT π
This document is Copyright (C) 1998 by Kevin Swan. respect the elders, they built the vibes. π«Ά
and that's the whole page, bestie!! unhtml, from the General Commands Manual, dated 3 February 1998 β shoutout to that date and to UNHTML(1) for being a real one. go cleanse some text. periodt. π
π¦ where this page comes from
- debian bookworm: unhtml 2.3.9-5 Β· GPL-2.0-only
- debian trixie: unhtml 2.3.9-6 Β· GPL-2.0-only
- ubuntu jammy: unhtml 2.3.9-4 Β· GPL-2.0-only
- ubuntu noble: unhtml 2.3.9-5 Β· GPL-2.0-only
- ubuntu questing: unhtml 2.3.9-6
- ubuntu resolute: unhtml 2.3.9-6build1 Β· GPL-2.0-only
- ubuntu stonking: unhtml 2.3.9-6build1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms