Skip to content

mgualdron/fcount

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fcount

build status

Description

Count the number of fields (columns) in every line of a delimited text file.

Available command-line options:

fcount --help

Usage: fcount [OPTION]... [FILE]...

Print field (column) count and number of lines for each count.
More than one FILE can be specified.

  -d, --delimiter=DELIM  the delimiting character for the input FILE(s)
                         (the default is a TAB)
  -H, --header           print a header line with the output counts
  -l, --line-count       print the record-count only (like wc -l)
  -q, --quiet            do not output counts, but return 2 if
                         multiple field counts are detected
                         (i.e. the file is inconsistent)
  -C, --csv              parse CSV files
  -Q, --csv-quote        CSV quoting character (ignored unless --csv)

Building fcount

The following projects have made fcount possible:

  • libcsv - Version 3.0.3 of libcsv is included with fcount.
  • gnulib - The getline module is included with fcount for portability.

Please consider contributing to those projects if you find fcount useful.

Note that this git repository does not include a configure script like a distribution tarball normally does. If you don't want to bother with installing autoconf and automake, then download a distribution package and run configure:

./configure

If you want the fcount binary installed in your $HOME/bin, you should run something like:

./configure --prefix=$HOME

If you're building from a copy of this git repository, you'll need to have autoconf and automake installed on your system, and run the following command to generate a configure script:

autoreconf -i

...and subsequently run configure as mentioned before.

After configure completes successfully, you can do the usual:

make
make check
make install

Author

Miguel Gualdron (dev at gualdron.com).

About

Count the number of fields (columns) in every line of a delimited text file.

Topics

Resources

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE
GPL-3.0
COPYING

Stars

0 stars

Watchers

1 watching

Forks

Contributors