eftychia: Me in kilt and poofy shirt, facing away, playing acoustic guitar behind head (Default)
posted by [personal profile] eftychia at 05:25am on 2011-03-22

"To say that using [the Leonard Cohen song] 'Hallelujah' to express sadness is unoriginal is like saying a picture hanger using a level is unoriginal: the point is not novelty, but functionality. The damn thing just works so well, you'd be a fool not to use it." -- Michael Barthel, on use of the song in television and film soundtracks, 2007-04-26

eftychia: Me in poufy shirt, kilt, and Darth Vader mask, playing a bouzouki (vader)
posted by [personal profile] eftychia at 10:19am on 2011-03-22

I seem to be on a sort-of daylight waking schedule again, at least for now. But with a nap in the middle.


So I'm working on this system that involves C, sed, a shell script, ImageMagick, Ghostscript, abcm2ps, and HTML.

I've written the shell script in csh/tcsh because when I first got my fingers on a Xenix shell prompt decades ago, csh looked more interesting than sh and I picked that to learn ... and I've never been sufficiently motivated to really master sh even though that's what all the shell script examples are always in (well, bash these days, but hey, whatever), along with pretty much every part-of-the-OS-distro script I've looked at and most other scripts anyone has written to share with others.

So here's the question:

Once I get this thing polished and debugged, should I

  • Grit my teeth, dump the bash man page to Mom's printer, and finally get around to teaching myself bash,
  • Ask a bilingual friend to translate my tcsh script into bash for me,
  • Leave it as is; that's what "#!/bin/tcsh" on the first line is for,
  • Learn Perl like a modern person,
  • Uh, I mean Python, or
  • Wrap it up in the C program with system() calls and just have one monster executable?

(And yeah, I know some of my friends prefer ksh, zsh, and others, but when it comes to distributing software in shell-script form, I seldom see anything other than sh/bash, and except for briefly using ksh under MKS + Desqview/X, all I've ever used is csh/tcsh.)

My gut instinct is to leave it in tcsh, 'cause that'll make it easier to maintain, and think about maybe someday getting around to adding an installer script (uh, I mean an 'install' target in the Makefile I should get around to writing) that looks up the correct local path to tcsh and modifies the magic-cookie first line of the script. I just wonder, am I that unusual for writing scripts in tcsh? OT1H, as I said, I only ever see sh/bash scripts distributed; OTOH, there must have been enough csh users to make developing tcsh worth somebody's time.

Links

January

SunMonTueWedThuFriSat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24
 
25
 
26
 
27
 
28
 
29
 
30
 
31