Skip to content

Instantly share code, notes, and snippets.

@lmullen
Created August 17, 2012 18:25
Show Gist options
  • Save lmullen/3381331 to your computer and use it in GitHub Desktop.
Save lmullen/3381331 to your computer and use it in GitHub Desktop.
Dissertation word count scripts
#!/bin/bash
source /Users/lmullen/.bash_profile
EPOCH=$(date +"%s")
DATE=$(date)
WCCH1=$(wc -w /Users/lmullen/acad/dissertation/ch1.dissertation.Mullen.md | sed 's/\/Users\/lmullen\/acad\/dissertation\/ch1.dissertation.Mullen.md//' | sed 's/ //g')
WCCH2=$(wc -w /Users/lmullen/acad/dissertation/ch2.dissertation.Mullen.md | sed 's/\/Users\/lmullen\/acad\/dissertation\/ch2.dissertation.Mullen.md//' | sed 's/ //g')
WCCH3=$(wc -w /Users/lmullen/acad/dissertation/ch3.dissertation.Mullen.md | sed 's/\/Users\/lmullen\/acad\/dissertation\/ch3.dissertation.Mullen.md//' | sed 's/ //g')
WCCH4=$(wc -w /Users/lmullen/acad/dissertation/ch4.dissertation.Mullen.md | sed 's/\/Users\/lmullen\/acad\/dissertation\/ch4.dissertation.Mullen.md//' | sed 's/ //g')
WCCH5=$(wc -w /Users/lmullen/acad/dissertation/ch5.dissertation.Mullen.md | sed 's/\/Users\/lmullen\/acad\/dissertation\/ch5.dissertation.Mullen.md//' | sed 's/ //g')
WCCH6=$(wc -w /Users/lmullen/acad/dissertation/ch6.dissertation.Mullen.md | sed 's/\/Users\/lmullen\/acad\/dissertation\/ch6.dissertation.Mullen.md//' | sed 's/ //g')
WCCH7=$(wc -w /Users/lmullen/acad/dissertation/ch7.dissertation.Mullen.md | sed 's/\/Users\/lmullen\/acad\/dissertation\/ch7.dissertation.Mullen.md//' | sed 's/ //g')
WCCH8=$(wc -w /Users/lmullen/acad/dissertation/ch8.dissertation.Mullen.md | sed 's/\/Users\/lmullen\/acad\/dissertation\/ch8.dissertation.Mullen.md//' | sed 's/ //g')
WCPRE=$(wc -w /Users/lmullen/acad/dissertation/preface.dissertation.Mullen.md | sed 's/\/Users\/lmullen\/acad\/dissertation\/preface.dissertation.Mullen.md//' | sed 's/ //g')
WCINTRO=$(wc -w /Users/lmullen/acad/dissertation/introduction.dissertation.Mullen.md | sed 's/\/Users\/lmullen\/acad\/dissertation\/introduction.dissertation.Mullen.md//' | sed 's/ //g')
WCCONCL=$(wc -w /Users/lmullen/acad/dissertation/conclusion.dissertation.Mullen.md | sed 's/\/Users\/lmullen\/acad\/dissertation\/conclusion.dissertation.Mullen.md//' | sed 's/ //g')
echo $EPOCH,$DATE,$WCCH1,$WCCH2,$WCCH3,$WCCH4,$WCCH5,$WCCH6,$WCCH7,$WCCH8,$WCPRE,$WCINTRO,$WCCONCL >> /Users/lmullen/acad/dissertation/wordcount-data.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment