Splitting up a too-wide text file

Jonathan I. Kamens jik at athena.mit.edu
Fri Mar 15 10:34:16 AEST 1991


  If you've got "cut", you can use that.  RTFM cut.

  If you've got "colrm", you can use that.  RTFM colrm.

  If you don't have "cut" or "colrm", then you can use "sed" to remove the
first part of each line, like

    sed 's/^................................................//'

or to print the last part of each line, like

    sed 's/^.*\(..............................................\)/\1/'

You get the idea, I hope.

  You can use perl, although perhaps that's overkill in this case (or perhaps
perl is *always* overkill :-).

  You can use "substr" inside awk to do it.

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710



More information about the Comp.unix.questions mailing list