home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!news.acns.nwu.edu!nucsrl!ddsw1!dattier
- From: dattier@ddsw1.mcs.com (David W. Tamkin)
- Subject: Re: Strange behavior with paste command
- Message-ID: <1992Jul27.153536.12371@ddsw1.mcs.com>
- Organization: Contributor Account at ddsw1, Chicago, Illinois 60657
- References: <1992Jul27.141928.28250@news.acns.nwu.edu>
- Date: Mon, 27 Jul 1992 15:35:36 GMT
- X-Disclaimer: Material posted in this article is the sole responsibility of
- the poster and does not represent MCSNet or the system owners.
- Lines: 40
-
- navarra@casbah.acns.nwu.edu (John Navarra) wrote in
- <1992Jul27.141928.28250@news.acns.nwu.edu>:
-
- | I don't get this! Why does the following happen with the paste command:
- |
- | $ paste file1 file2 file3 > file.results
- | $ cat file.results
- | lsr005-1.wav 5.050659E-03 8.773804E-03
- | lsr005-2.wav 9.506226E-03 1.493835E-02
- | lsr005-3.wav .0128479 1.991272E-02
- | lsr005-4.wav 1.850891E-02 .0272522
- | lsr005-5.wav 2.275085E-02 3.291321E-02
- | lsr025-1.wav 4.780579E-02 6.880188E-02
- | lsr025-2.wav 6.732178E-02 9.716797E-02
- | lsr025-3.wav 9.461975E-02 .1350403
- | lsr025-4.wav .1144867 .163559
- | lsr025-5.wav .1334534 .1909943
- | lsr1-1.wav .3167419 .4694824
- | lsr1-2.wav .5150909 .739624
- | lsr1-3.wav .7581482 .9957733
- | lsr1-4.wav 1.062622 1.255859
- | lsr1-5.wav 1.37088 1.504074
-
- | What's up with the last line? Is there some way to make this print
- | out right?
-
- It *does* print right. Paste does not try to align columns; it just sticks
- a separation character (default being tab) between fields, as TFM says.
-
- Your last entry in column two is only seven characters wide, so a tab to the
- next stop moves only one space farther. All the other entries in column 2
- (from the second input file) are eight to twelve characters wide, so a tab
- gets you sixteen columns to the right of where the second column started.
-
- Since none of your entries are wider than twelve characters, you can fix it
- for this particular case by setting your tabstops fourteen or more columns
- apart. I know of no general solution.
-
- David W. Tamkin Box 59297 Northtown Station, Illinois 60659-0297
- dattier@ddsw1.mcs.com CompuServe: 73720,1570 MCI Mail: 426-1818
-