On Thu, 24 May 2001, Kyle Donaldson wrote:
> I've attached a C source file with a function (nsh_exec() - no shell exec)
> which will take a string, split it (obeying quotes and expanding wildcards
> when possible, I might add), and then fork() and execute it.
>
> Also here's a patch on main.cc and which changes main() to grab the
> environment and copy it to an external variable 'envlist'. This must be
> applied for nsh_exec() to work.
Thanks for this ideas. (And sorry for the delayed reply.)
Obeying quotes and escapes is a good idea, but I think expanding wildcards
and the other features are superfluous (at least as a blackbox menu
entry). If someone wants this further support, they should just use "sh
-c" (or my [shexec]) to have the shell do the extra work.
Jeremy C. Reed
....................................................
BSD software, documentation, resources, news...
http://bsd.reedmedia.net/