Path: utzoo!utgpu!attcan!uunet!tektronix!nosun!dawson.fpssun.fps.com!dawson From: dawson@fpssun.fps.com (Bryan Dawson ext 1184) Newsgroups: comp.unix.questions Subject: Re: tabs converted to spaces? Summary: expand is the correct tool to convert tabs to spaces Keywords: expand Message-ID: <288@dawson.fpssun.fps.com> Date: 25 Jul 88 16:41:07 GMT References: <3940001@hpgrla.HP.COM> <187@alobar.ATT.COM> <4425@ptsfa.PacBell.COM> Organization: Floating Point Systems Lines: 12 In article <4425@ptsfa.PacBell.COM>, dmt@ptsfa.PacBell.COM (Dave Turner) writes: > In article <3940001@hpgrla.HP.COM> douglasg@hpgrla.HP.COM (@Douglas Genetten) writes: > >Is there a filter which converts tabs to n-spaces throughout > >a file? > > You might try newform and/or sed. Several replies have mentioned tr or sed. I assume that the desired result is to convert tabs to spaces *in a fomat preserving manner*. The correct standard tool to do this in UNIX is expand. Expand is designed to perform exactly this function (and its inverse 'unexpand') and does so very well.