Skip to content

Instantly share code, notes, and snippets.

@PMaynard
Last active April 4, 2016 13:55
Show Gist options
  • Save PMaynard/9669a6d97d82907cef2d1bb84ce6804f to your computer and use it in GitHub Desktop.
Save PMaynard/9669a6d97d82907cef2d1bb84ce6804f to your computer and use it in GitHub Desktop.
Trackers word, line, byte size, and char count. cron this to run, chart the output.
#!/bin/bash
FILE="file.md"
COUNT=$(wc -w -l -c -m "$FILE" | tr -s ' ' | sed 's/^//' | sed 's/ /,/g' | cut -b 2- )
DATETIME=$(date +%Y-%m-%d-%H-%M)
echo $COUNT,$DATETIME >> "tracker.csv"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment