Text processing with the UNIX toolbox

Submitted by dylan on Mon, 2007-02-19 23:44.

 
Working with DBF files

  • Extract the text contents of a DBF file with dbfxtrct, select out the 3rd and 2nd columns with awk, keep only unique rows with sort and uniq, and finally saving to a new file called 'ca_fips-name_list.txt' with shell redirection.
    # dbfxtrct utility
    dbfxtrct -ica_counties_aea83.dbf | awk -F"," '{print $3","$2}' | sort -g | uniq > ca_fips-name_list.txt
  • Other DBF tools include:

    • dbf2mysql
    • dbf2pg
    • dbfadd
    • dbfcreate
    • dbfdump
    • dbfutil1
    • dbfxtrct
( categories: )