If you’re like me, you have to compile reports, figure out how many files contain the word “babaloo”, etc…
What do you use to figure out these quick hits?
Do you just do the task manually, or do you figure you could/would/should write a utility with X language / script ?
I find myself using Javascirpt a lot for these quick hits. Sure, I can’t use it for file operations (outside of the web sandbox anyways) but I find it works a lot of the time.
I work on Solaris, so I’ve got plenty of handy Unix commands to do that kind of thing. If it is too complicated, I can whip up a quick awk or Perl script to do it.
If it’s short, perl on the command-line (sometimes with some piping through some combination of sort, uniq, fgrep, or wc even though those bits can be handled in Perl). I can’t remember the last time I used sed once I got comfortable with perl’s command-line shortcuts.
I have a big directory full of utility programs, dating back to DOS days. To find files containing a particular string I’d use the old Norton Utilities ts.exe (Text Search).
For quick-and-dirty text programs I’d use QuickBasic. Yep. Don’t laugh, I know it inside out and can knock out a quick program in a couple minutes. It used to be slow but on modern processors it performs just fine.
Python. I’m doing it right now, to sort through the OpenStreetMaps data for San Francisco. If it’s short, or a one-off, I’ll just do it entirely in the interpreter.
Hey, I’ve been wondering, how good are Apple’s built in tools? AppleScript looks cool and the Automator thing looks really slick. I’ve only played with them a little bit at Best Buy, though.
Not that I know what the hell I’d do with them. Just curious.