can't run "date" command

A strange observation -

$ ksh date
ksh: date: cannot execute

$ ksh "date"
ksh: date: cannot execute
$ ksh "date "
Thu Sep 18 09:22:12 CDT 2008

why the date command doesn't run without a space ??

Please help

ok - this is a slightly odd one...

correct syntax would be

ksh -c "date"

which works.

When you omit the -c, it looks like, from truss, if you pass " " then the ksh gets a SIGQUIT sent, and then the date command is ececuted seperately under your current shell.

As to exactly why it behaves like this.....not a clue :stuck_out_tongue:

maybe someone (some thing) moved the date command to "date "
(the file name has a space)
i have seen some weird (and imposible) names for files, like some amount of blank spaces (i never got to know how many)

A shell runs shell scripts, not binaries.

If you have a space in the command, it is not a binary, but shell syntax.