On Sun, Aug 17, 2008 at 7:03 PM, Jonathan Kulp <[EMAIL PROTECTED]> wrote: > Ok I've come up with a completely different script that does what I > *thought* the original one was supposed to do. Searching around I found a > couple of commands that make the entire thing simpler and easier for me to > understand. I don't really understand how to use sed and only used it b/c I > grabbed a snippet of code from an unrelated script. I've run this one from > many different directories on many different files and it has worked > perfectly each time. I'm glad this thread started b/c it taught me that I'm > not as smart as I thought I was, but also demonstrates the amazing > flexibility of unix-like scripts--there's more than one way to do stuff. > (The fact that my script and Jay's below essentially do the same thing is > astonishing to me. Jay's looks so much more impressive!) OK here's the > script, which I save as "lily" in my ~/bin directory and run as "lily > filename.ly" >
The scripts do essentially the same thing. The only thing I was trying to do was allow for normal lilypond command line arguments also. The sed line is a hack to pull out all but the last argument. It will break if the last argument is quoted and has a space in it. -----Jay P.S. I didn't know basename took a second argument to chop off the extension. Neat. _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user