Last active
October 30, 2020 20:00
-
-
Save lee2sman/0d3865bfa96ac9726acb255b64bab776 to your computer and use it in GitHub Desktop.
fish script for writing 750words (approx 3 pages) a day
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env fish | |
# note: all progress saved whether you hit 750 words or not | |
# replace with location of journal | |
set journal ~/.journal.txt | |
# start | |
echo "today's 750 words..." | |
set totalcount 0 | |
echo (date +"%b %d, %Y") >> $journal | |
echo "--------------" >> $journal | |
while test $totalcount -lt 750 | |
read entry | |
set thiscount (echo $entry | wc -w) | |
set totalcount (math $thiscount + $totalcount ) | |
echo "Total words: $totalcount" | |
echo $entry >> $journal | |
echo "" >> $journal | |
end | |
echo "" >> $journal | |
echo "Complete!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment