Re: get output from ssh2_shell



kenqcl@xxxxxxxxx wrote:
> fwrite($s, "ls /tmp");
>
> $o = fread($s, 100);

> But I can't get any output using fread. How can I get the
> output(STDOUT)?

That's because you didn't tell the shell to do somehting, you only send
some characters... Try appending "\n" to tell the shell to execute
received chars.

.



Relevant Pages

  • Re: rmdir when directory is not empty
    ... rm will fail because the shell cannot keep track ... the find cmd works because it deals with one file at a time. ... Prev by Date: ...
    (Fedora)
  • Re: PMR 446 Funk: Reichweitenproblem
    ... "Verwende Perl. ... Shell will man können, dann aber nicht verwenden." ... Prev by Date: ...
    (de.sci.electronics)
  • Re: Veronica Mars break
    ... there's a big difference between being able to afford to shell out $22M ... Prev by Date: ...
    (rec.arts.tv)
  • Re: find and delete all invisible files
    ... why your suggestion should NOT work ... ... never understand my Shell ... ... Prev by Date: ...
    (comp.unix.shell)
  • Scripting printer installation
    ... printer is already installed for a user that is logging on. ... I'm using kix or ... shell, but have never been able to figure out how to check if the printer ... Prev by Date: ...
    (microsoft.public.win2000.printing)