ECN No Name Newsletter: December, 1990

The ECN No Name Newsletter is no longer being published. This is an archived issue.

[previous article] [next article]

Using Paste To Convert Qplot Files To Grap Files

Stacey Clark

If you have two files that you want to merge by columns there is a UNIX program called paste A simple example of this is:

Script started on Wed Nov 7 16:14:55 1990

     % cat x
     1
     2
     3
     % cat y
     10.
     20.
     30.
     % paste x y
     1       10.0
     2       20.0
     3       30.0
Note: This column merging is on  the  screen;  so,  to  save  the
information into a file, use:

     % paste x y > xy

Now you have a file called xy that can be read by grap! Also, the tbl program can be easily used to print the file. If you are putting columns of data together for another program, you may need to remove the separation character that is used by paste You can see with the cat -t command that the tab key separates the two columns:

     % cat -t xy
     1^I10.0
     2^I20.0
     3^I30.0
     %

The "expand" command can be used to create a file with NO tab characters...

     % expand < xy > xy.good

     % cat -t xy.good

     1       10.0
     2       20.0
     3       30.0


webmaster@ecn.purdue.edu
Last modified: Thursday, 23-Oct-97 20:20:58 EST

[HTML Check] HTML