In the last episode (Jul 23), [EMAIL PROTECTED] said: > Quoting Dan Nelson <[EMAIL PROTECTED]>: > > In the last episode (Jul 23), Rus Foster said: > > > > cd seems to work (I can cd to directories that I know exist, > > > > but get an error if I try to cd to a directory that doesn't), > > > > but echo always just returns * > > > > > > hmm strange...it could be the shell as echo * on mine does and ls > > > > "echo *" in an empty directory will print "*", since /bin/sh passes > > unmatched patterns through. > > > > -- > > Dan Nelson > > [EMAIL PROTECTED] > > > > But I would think that this means the shell couldn't open the > directory to get the filenames to match?
That's also a possibility. You can use cat to tell the difference though.. Here's a "ls" shell function that knows the difference between an empty directory and one it can't read. Unfortunately, it requires cat, whereas plain "echo *" is done without forking: ls () { cat . > /dev/null && echo * ; } -- Dan Nelson [EMAIL PROTECTED] _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"