Chet Ramey wrote: > Dave Rutherford wrote: > > Now, "[[" isn't very well documented, so I tend not to use it, > > I'm always interested in suggestions for improving the bash documentation. > Can you tell me what's unclear about the existing description of > `[['?
It's probably my fault. I just don't really understand why it exists. I know it does one thing -- =~ -- that `test' doesn't. I've never needed that. The string operators ${#, %, /} are my friends. So are awk and sed. And bash in general, for that matter. But if I need a regex, it's probably to do some modification, so I'll need to do more with it than merely match it. If `test' weren't a shell builtin but was still /bin/[, I'd be using [[ for speed. But it is, so I don't. I know test's quirks. Does [[ have quirks? Are they the same? Is there room in my grey matter to hold both sets of quirks and keep them straight? Perhaps a FAQ entry, or a part of the man page, explaining when to use [[ and when [ would be of some help. Best regards, Dave