Re: -d option not working. . .?

2007-09-12 Thread Michael Williams
Two words: history and POSIX. It's been done that way for more than 20 years, so it was standardized that way. Changing it would break too many existing scripts. Forgive me for saying so, and please appreciate both the sarcasm and irony, but I've never been one for "that's the way it's

Re: -d option not working. . .?

2007-09-12 Thread Michael Williams
On Sep 12, 2007, at 2:56 AM, Bob Proulx wrote: The [ is a shell builtin, not a shell metacharacter. Shell metacharacters do not need to be separated by whitespace but the test program needs to be apart or it won't be parsed right. That is why you are seeing "[-d" not found. It is not a paren

-d option not working. . .?

2007-09-11 Thread Michael Williams
Hi All, I've got a script that I'm trying to set up, but it keeps telling me that "[-d command not found". Can someone please explain what is wrong with this?: #!/bin/sh for i in $* do { if [-d $i] then echo "$i is a directory! Yay!" else