[Metacard] RE: shell behavior ( strange or mistake)

thierry Douez t.douez at wanadoo.fr
Sat Nov 24 07:19:02 EST 2001


  | De la part de xbury.cs at clearstream.com
  | Envoyé : Thursday, November 22, 2001 5:25 PM
  | Thierry,
  |
  | I dont know about alternative shells but... (i use mostly NT
  | so, shell is "cmd" but i've had no problems with command from w98)

I tried alternative shell, because i got problems with command.exe !!!

the idea is to have a set of text fields, each one is a full perl script.
These perl scripts are driving a physical robot, via perl libraries,
outside Metacard. MC is used as a GUI for end-users plus hiding all the
complexity. This has to be a full security software, admit 0 bugs.

In MC, when the perl script is choosen, i send the shell command :
shell( "perl -e & quote & field "PerlScript_33" & quote ) ...

...did a lot of tries, and for instance MC could send a 20 lines perl script
opening an MS-Access database, sending SQL commands,
formatting everything and giving the result back to MC.

But, doing some others checking, it happened that this technic do not work
all the time... the job "MC->shell->command.exe" bugs depending of what is
in
the perl script, but NOT the number of chars or lines of the perl script...
and it's not a perl script mistake !
I guessed then, that the shell call or command.exe was not reliable enough
???

That's why i change the command.exe with bash or tcsh ! and, then i saw
an error message showing this '/C' parameters which means command's
following.

So, I hope this a bit clearer... I need absolutely a solution like this,
for differents aspects... et Voila :-)

  | make sure your "directory" global is set to something that exists...
  | set the directory to "c:\"

tried this too, no change !

  | use of backslash or slash within the command shell should be
  | backslash...  Slash is only good in MC directory commands

Ok

  | Scott has told me that the "open process" works better but i've
  | had enormous
  | problems with compatibility and getting the whole output back whereas
  | shell() works great in all senses.

I need a solution for a PC WIn98 and NT only !

  | Last but not least, remember that the path will affect the workings of
  | different programs you call from shell or open process, so providing the
  | path can help...
  | cheers, Xavier
  |

Thanks a lot for your long mail and explanations. Can one tell me more ?
Have a nice week-end
thierry

  | > Spend few times trying to play with shell options.
  | > Here is one my smaller program :
  | >     -- PC /Win98 / MC2.3
  | >   set the hideConsoleWindows to false
  | >   set the shellcommand to "bash"
  | >   put  shell( "echo $0 $1 $2"  ) after field "R"
  | > I got this error after the Shell() execution :
  | >      /C: /C: No such file or directory
  | > It seems that MC put a Dos parameter "/C" after the name of
  | > the shell ? Ok, if the shell is Command.exe ! but, what if we want
  | > another shell ? A bit of light would be helpful.
  | > thierry




More information about the metacard mailing list