This isn't a question as much as an interesting finding, to get
grep to work with the
-v flag when the entire file is grepped-out, you need to add
|| true to make sure the jobs doesn't fail due to a nonzero exit code from grep.
For example this tool concatenates several vcf files together, but will fail withouth the
|| true if
grep removes the only line from a vcf that only has the header (no variants):