another shellscript problem

Andreas Unterkircher <[email protected]>
Newsgroups gmane.comp.java.smartfrog.user
Message-ID <[email protected]>
Hello,

here's another shellscript problem I encountered. I made the file 
/tmp/temp.txt with the content

/tmp

Now "ls -l < /tmp/temp.txt" just lists the contents of /tmp. Executing 
this command with the org/smartfrog/services/os/runshell works fine:

#include "org/smartfrog/services/os/runshell/components.sf"

sfConfig extends Compound {
 do extends BashShellScript {
  processName "do";
  cmd ["ls -l < /tmp/temp.txt"];  
 }
}

This gives the contents of /tmp as output. However with the new 
org/smartfrog/services/shellscript/ I'm running into trouble:

#include "org/smartfrog/services/shellscript/components.sf"

localShellExec extends BashExec {
 cmd ["/bin/bash"];
}
localShell extends Shell {
  exec extends localShellExec;
}
sfConfig extends Compound {
 shell extends localShell;
 doScript extends Script {
  shell LAZY ATTRIB shell;
  startScript ["ls -l < /tmp/temp.txt"];
  autoTerminate true;
 }
}

Using the shellscript component in this way causes the command to fail 
somehow. I switched on DEBUG and there I see the message

- /bin/bash: line 1: /tmp/temp.txt],: No such file or directory

What's wrong with my usage of the shellscript component ?

Thanks,
Andreas


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.