next up previous contents
Next: FTNSTRIP - Importing Fortran Up: Data Format conversion Previous: Data Format conversion   Contents

A2B and B2A - ASCII to Binary, Binary to ASCII

Of all of the formats of data, the most transportable (and most space consuming) is ASCII. No matter what system you are working on, it is possible to transport ASCII data to and from that system. Also, because text editors support ASCII, it is usually possible to data entry and data editing in the simplest of text editors.

Such data probably come in a multicolumn format, separated either by spaces or tabs. To convert such a, say 5 column, dataset into binary floats, type:

% a2b < data.ascii n1=5 > data.binary 
The reverse operation is
% b2a < data.binary n1=5 > data.ascii 



John Stockwell 2007-04-10