home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / question / 9449 < prev    next >
Encoding:
Text File  |  1992-07-27  |  2.3 KB  |  53 lines

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