Works fine
(bin) 10 % set t "cmd.exe /c edit.com"
cmd.exe /c edit.com
(bin) 11 % exec $t &
couldn't execute "cmd.exe \c edit.com": no such file or directory
(bin) 12 %
the /c is changed to \c. I tried //c & \\c with the same results
I also put the full path to cmd.exe with the same results.
set t "C:/Windows/system32/cmd.exe /c edit.com"
set t "C:\\Windows\\system32\\cmd.exe /c edit.com"
exec C:/Windows/system32/cmd.exe /c edit.com
works fine.
This just started occurring and there was no problem earlier with the same
settings.
% echo $env(Path)
"C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
Files\QuickTime\QTSystem\;C:\Tcl\bin;C:\Windows\system32;
C:\Windows;C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
Files\QuickTime\QTSystem\\"
--
Best Regards, Keith
http://home.comcast.net/~kilowattradio/
Tired of Google Groups?
http://home.comcast.net/~kilowattradio/usenet.html
> (bin) 9 % exec cmd.exe /c edit.com
>
> Works fine
>
> (bin) 10 % set t "cmd.exe /c edit.com"
> cmd.exe /c edit.com
>
> (bin) 11 % exec $t &
> couldn't execute "cmd.exe \c edit.com": no such file or directory
> (bin) 12 %
exec expects the executable name as its first argument. When you do
exec $t
$t is taken as the name of the executable to run, hence it fails with
"no such file or directory" in your case.
Use
eval exec $t
This expands $t before calling exec and so it sees a list of arguments.
--
�scar
Thanks for the tip.