column

Purpose: To allow a user to pull off selected columns of data. This should be used to view the contents of selected columns rather than used as an extraction tool, as the program does not allow one to simultaneously pull off columns 6-7, 11-13, 49-50, and 51-57.

One can get the same results with awk and/or cut in UNIX. However, these UNIX utilities will only work with data that have short record lengths.

To run, enter column x y < z

where:

Notes:

  1. To limit the amount of output printed to the screen, use with the more utility:

    column 12 13 < data | more

  2. If data are compressed, the data can be piped in from a decompression program: zcat data.Z | column 12 13
  3. To send output to a file named doc,

    column 50 54 < data > doc

  4. To get the contents of selected columns (e.g., 79 through 80) for the first 20 records or the last 15 records, combine column with head/tail .

    head -20 data | column 79 80 > doc

    tail -15 data | column 79 80 >> doc


NEW PSC blog

Recent resources, events, news

New Publications

Burgard & Lee-Rife. "Community Characteristics & Sexual Behavior." PSC Research Report.

Walsemann, Geronimus & Gee. "Accumulating Disadvantage"

Next Brown Bag

Seminars will start up again in fall 2008
Check for new schedule


W A R N I N G

If you are reading this, it may be that you are using rather old web browsing software that does not support modern international Web technology standards. For a better experience of the Web and this site in particular, please upgrade your web browser software today. The following are good choices: Firefox 2; Opera 9; Safari 3.