Entab 1.0 util/cli Short: entab - space/TAB conversion utility Author: ex-grahn@mdstud.chalmers.se (Jörgen Grahn) Uploader: ex-grahn@mdstud.chalmers.se In February this year (1994), a person called Bruce Momjian posted some UNIX source code in a Usenet newsgroup (comp.sources or something). I looked at it, found it useful and took it home. I made it handle arguments in the standard Amiga way rather than the UNIX way. I also couldn't resist cleaning up the code a bit, making it a bit more ANSI. Then I forgot about it until now. I would want a utility like this one, if I didn't already have it. Entab is a shell command for manipulating text files. In a text file, a TAB or a few spaces normally look the same. The text doesn't look different if you add spaces or TABs at the end of a row either. If the text is some kind of source code (C or LaTeX, for example) neither the text editor nor the compiler cares about white space. However, people have different taste. Some people like to format their texts and source code with 8-character TABs, some (like me) would rather use 4-character TABs, and others prefer plain spaces. This is where Entab comes in. Entab can convert spaces to TABs, or TABs to spaces. It is smart about where it replaces spaces. Additionally, it can strip trailing spaces at the end of rows for people like me who hate unnecessary spaces. Template: NOTRAIL/S,DETAB/S,QUOTE/S,MINSPACE/N/K,TABSIZE/N/K,FILES/M Entab reads one or more files and writes to standard output. If no filename is given, entab reads standard input, so it should be possible to use with pipes. For more details, refer to the original UNIX documentation, entab.doc in this distribution. Some notes: x The original author didn't claim any copyright as far as I could see. I don't either. You may spread this archive as you please, and also make improvements and modifications. x This was a quick port. My version may have introduced tons of bugs. Hope you have access to a compiler; then you can correct them. x Oh, yeah, this won't work with pre-2.0 releases of the OS. x The supplied Makefile won't work on an Amiga or with SAS/C I guess. I forgot how I compiled it; must've done it manually. How barbaric... 1994-09-03 Jörgen Grahn Wetterlinsg. 13e S-521 34 Falköping SWEDEN