COLUMN may be used to extract a column of data from a text file. The file is presumed to consist of lines of data. Each line of data contains several words, separated by one or more spaces or TAB characters. The first word in each line is the first "column", and so on. COLUMN reads each line of data, pulls out the word in the requested column, and writes that word to a new file.
The program can be used in command line form:
column column_number filein fileoutor can be invoked interactively with no arguments, in which case the program will request information from the user.
For example, if file.txt contains the lines:
CAT RED APPLE 9.5
MOUSE BLUE ORANGE 12.5
DOG purple Banana 34.7
then the command
column 2 file.txt mydata.txtwill copy the following data into mydata.txt:
RED
BLUE
purple
Files you may copy include:
The list of routines includes:
Back to the FORTRAN software page.