#!/bin/bash

#
# Count the number of entries in a VCF file.
# Works with .vcf, .vcf.gz and piped input.
#

gzip -fcd $1 | \
awk 'BEGIN {i = 0} {if(!($1 ~ /^#/ || $1 == "'""'")) {i += 1;}} END {print i}'
