Skip to content

Instantly share code, notes, and snippets.

@zkamvar
Created September 8, 2017 20:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zkamvar/251e8add8c28fdb2d4e7842fff4ce0cd to your computer and use it in GitHub Desktop.
Save zkamvar/251e8add8c28fdb2d4e7842fff4ce0cd to your computer and use it in GitHub Desktop.
create csv from gvcf
#!/usr/bin/env bash
# This ridiculous script will take in a file as input and spit out comma-separated text for easier parsing.
# Usage:
# $ gvcf2csv.sh GVCF.err | column -t -s,
grep ProgressMeter $1 | \
awk -F" - " '{print $2}' | \
tail -n +2 | \
sed -E 's/[ ]\|[ ]/,/g' | \
sed -E "s/([0-9hmsw%])[ ]{3,}([0-9])/\1,\2/g"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment