UNIX command line file auditing

I am cleaning out my home directory on one on the UNIX boxes I have an account on and I coming across all sort of little hints I have left myself.

Sometimes it is helpful to get an idea of what a file feed looks like without going to the effort of loading the flat file into a Oracle table to perform SQL queries.

For instance, I have a sample data feed of 150,000 records in a flat file format and I want to see the distinct values of the 3rd column, the columns being delimited with a Setia character:

cut -d"Ç" -f3 sample_file_feed.dat | sort | uniq > col3_audit.txt

This entry was posted in computers/programming. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *