Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.questions Subject: Re: Splitting up a too-wide text file Keywords: split Message-ID: <1991Mar15.180018.17972@athena.mit.edu> Date: 15 Mar 91 18:00:18 GMT References: <1991Mar15.003416.16893@athena.mit.edu> <1991Mar15.012231.7048@convex.com> <1991Mar15.032648.21@cbnewsi.att.com> Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology Lines: 19 In article <1991Mar15.032648.21@cbnewsi.att.com>, npl@cbnewsi.att.com (nickolas.landsberg) writes: |> LENGTH=whateveryourlinelength Surely you mean "whateveryourpagelength" here and not "whateveryourlinelength?" Otherwise, I don't see how your script makes any sense, since the "split" command isn't going to split the file in columns, it's going to split it in lines. If that's what you meant, then sure, you can get things to work the way you specified. But personally, it seems to me that using the hold space in sed or a variable/array in awk to store text would be a better solution, since it would require no temporary files and world use far fewer forks and execs in order to do the job (and therefore would be significantly faster). -- Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710