Filed under: Internet, Terminal Tips
Terminal Tips: HTML via the command line

Robert Daeley over at MacDevCenter has an article up detailing HTML Tools on the Mac Command Line, which would seem to be a pretty good starting place for those of you who code HTML on a regular basis and would like to unleash some of the power of the UNIX-based underbelly of OS X and the Terminal.
I like the
textutil command that can take any .txt file and automagically turn it into a properly coded webpage:
textutil -convert html foo.txt
This produces a file called foo.html in the same directory without mangling the original text file. Neat.

![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 1)
Mark said 9:54AM on 11-28-2005
can't get this to work in OS X.3.9
Could also be that i don't have admin rights... stupid I.T. and their stupid locking down of stupid computers :(
(can you tell i'm bitter?)
Reply
Tom O'Neill said 10:06AM on 11-28-2005
Man page says it was added in 10.4, sorry Mark.
Reply
Bob Bradley said 11:26AM on 11-29-2005
Nice hint. I was not aware of this utility. I'll check out the other options as well.
Reply