On Mon, Nov 12, 2007 at 02:02:32AM +0100, Linus Swdlas wrote: > On Mon, 12 Nov 2007 00:25:29 +0100, ropers <[EMAIL PROTECTED]> wrote: > > The ${var##string} part is ksh or bash specific, see "Parameter Expansion" > in the bash man page if you're using bash. > I see your #! line says /bin/sh but to my knowledge a "real" sh, not > emulated by bash or ksh doesn't support ${##} and friends, if I'm wrong > feel free to correct me. =)
This kind of parameter substitution is in the POSIX 1 specification for sh. See the parameters section of the man page for sh(1). > Yes. $@ is also all the positional parameters, they expand differently > when expanded inside "". A full explaination can be found under "Special > Parameters" in the bash man page. Since the other person is using sh, at the moment, it is probably more apt to point to the Parameters section of the man page for sh(1). > But I wouldn't, I'd let bash do it: Probably better to use sh, or ksh, since they are in OpenBSD by default, and are more than up to the task. cheers, -b