2008/10/15 John Stoneham <[EMAIL PROTECTED]>: > On Wed, Oct 15, 2008 at 3:25 PM, Henry Vermaak <[EMAIL PROTECTED]> > wrote: >> >> yes, i know about that way, since i use bash, but i thought it was >> bash specific? have you tested with other shells? you can also use >> "basename" to remove suffixes. > > Well, the script invokes bash to run itself (the she-bang on the first line > causes this), so it doesn't matter if the user is calling it from some other > shell.
and what if bash is a symlink to something else? it's not uncommon at all to have different shells point at the one that's installed. certain versions of osx runs zsh (luckily that also supports ${name%pattern}). > Also "basename" is overkill for removing suffixes (it's actually a separate > program, like sed), and you'd still need to call it twice to remove both > suffixes. that's why i said sed should be run _once_ over the whole output of ls. either way, i really don't care. if it works it works, it's not like we're worrying about performance. henry _______________________________________________ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus