You're Invited!
To celebrate the beginning of the last year of my third decade, a few friends and I are getting together Saturday night at the Yardhouse at Irvine Spectrum. We'll be there around 7:00-ish.
If you're in the area, feel free to stop by!
Geek Corner
So I've shared before that I do all of my journal entries in vi before I post them. I also keep them saved locally, under a filename such as "sg-050125-1.txt", or "sg-YYMMDD-#.txt"---this ensures they sort properly.
Because I am one of those people who are rarely cognizant of the date, it's a lot easier to have the computer figure that out for me. So for a while, I would do something like this on the command line:
$ vi sg-`date '+%y%m%d'`-1.txt
Now, this was all well and good, except that if I stayed up late one evening, and ended up writing one entry early in the morning before I slept, and a second that night for that day's entry. This would force me to have to manually edit that command line.
That won't do.
So, this afternoon I finally spent a few minutes and created an alias to get the next file, whatever it may be:
ENTRY=1; DATE=`date '+%y%m%d'`; while [ -f "sg-$DATE-$ENTRY.txt" ]; do let "ENTRY=(($ENTRY + 1))"; done; vi "sg-$DATE-$ENTRY.txt"; open "sg-$DATE-$ENTRY.txt"
This gets the next file for the day, edits it in vi, and then opens it with TextEdit for spell-checking purposes (does anyone know of an OS X program that will spell check around the journal tags?) and so I can copy and paste into the update page.
To celebrate the beginning of the last year of my third decade, a few friends and I are getting together Saturday night at the Yardhouse at Irvine Spectrum. We'll be there around 7:00-ish.
If you're in the area, feel free to stop by!
Geek Corner
So I've shared before that I do all of my journal entries in vi before I post them. I also keep them saved locally, under a filename such as "sg-050125-1.txt", or "sg-YYMMDD-#.txt"---this ensures they sort properly.
Because I am one of those people who are rarely cognizant of the date, it's a lot easier to have the computer figure that out for me. So for a while, I would do something like this on the command line:
$ vi sg-`date '+%y%m%d'`-1.txt
Now, this was all well and good, except that if I stayed up late one evening, and ended up writing one entry early in the morning before I slept, and a second that night for that day's entry. This would force me to have to manually edit that command line.
That won't do.
So, this afternoon I finally spent a few minutes and created an alias to get the next file, whatever it may be:
ENTRY=1; DATE=`date '+%y%m%d'`; while [ -f "sg-$DATE-$ENTRY.txt" ]; do let "ENTRY=(($ENTRY + 1))"; done; vi "sg-$DATE-$ENTRY.txt"; open "sg-$DATE-$ENTRY.txt"
This gets the next file for the day, edits it in vi, and then opens it with TextEdit for spell-checking purposes (does anyone know of an OS X program that will spell check around the journal tags?) and so I can copy and paste into the update page.
cayce:
the story about you and your son is so the cutest story ever. i think you win most adorable dad of the year.