2017-05-16 13:01 GMT+02:00 K K Subbu :
>
> If you run it from command line, does it list the files on the tty? Then
> it could be a bug in redirectStdout method.
>
Yes, it works from command line
On Tuesday 16 May 2017 04:26 PM, Denis Kudriashov wrote:
I checked again. It not works on Raspberry same way: empty string
returns. Not know how it would be on other Linux
If you run it from command line, does it list the files on the tty? Then
it could be a bug in redirectStdout method.
2017-05-15 22:19 GMT+02:00 Denis Kudriashov :
> 2017-05-15 18:10 GMT+02:00 Alistair Grant :
>
>> And if I execute the following in a playground:
>>
>> | ls |
>> OSSUnixSubprocess new
>> shellCommand: 'ls ~';
>> redirectStdout;
>>
2017-05-15 18:10 GMT+02:00 Alistair Grant :
> And if I execute the following in a playground:
>
> | ls |
> OSSUnixSubprocess new
> shellCommand: 'ls ~';
> redirectStdout;
> runAndWaitOnExitDo: [ :process :outString |
> ls :=
On Mon, May 15, 2017 at 04:10:17PM +, Alistair Grant wrote:
> On Mon, May 15, 2017 at 08:14:44AM -0700, Eliot Miranda wrote:
> >
> >
> > On Mon, May 15, 2017 at 8:09 AM, Damien Pollet
> > wrote:
> >
> > My point was, if #shellCommand: accepts a single string
On Mon, May 15, 2017 at 08:14:44AM -0700, Eliot Miranda wrote:
>
>
> On Mon, May 15, 2017 at 8:09 AM, Damien Pollet
> wrote:
>
> My point was, if #shellCommand: accepts a single string for a whole
> command, then surely it passes it to a system shell already,
> On 15 May 2017, at 18:03, Denis Kudriashov wrote:
>
>
> 2017-05-15 16:55 GMT+02:00 K K Subbu :
> What exactly are you trying to do? If you want the list of entries in ~
> directory, you could use FileDirectory methods:
>
> (FileDirectory on:
2017-05-15 16:55 GMT+02:00 K K Subbu :
> What exactly are you trying to do? If you want the list of entries in ~
> directory, you could use FileDirectory methods:
>
> (FileDirectory on: (OSProcess thisOSProcess environmentAt: 'HOME'))
> entries collect: [ :f | f name ].
>
On Mon, May 15, 2017 at 8:09 AM, Damien Pollet
wrote:
> My point was, if #shellCommand: accepts a single string for a whole
> command, then surely it passes it to a system shell already, so why nest a
> bash in between? (effectively running the equivalent of sh -c "bash
My point was, if #shellCommand: accepts a single string for a whole
command, then surely it passes it to a system shell already, so why nest a
bash in between? (effectively running the equivalent of sh -c "bash -c \"ls
~\"')
On 15 May 2017 at 16:28, Eliot Miranda wrote:
On Monday 15 May 2017 05:46 PM, Denis Kudriashov wrote:
OSSUnixSubprocess new
shellCommand: 'ls ~';
redirectStdout;
runAndWaitOnExitDo: [ :process :outString |
^outString
].
What exactly are you trying to do? If you want the list of entries in ~
directory, you could use FileDirectory
Hi Damien,
> On May 15, 2017, at 6:44 AM, Damien Pollet wrote:
>
>> On 15 May 2017 at 15:26, Eliot Miranda wrote:
>> Try something like
>>
>> shellCommand: 'bash -c ''ls ~''';
>
> But then that would run ls inside of bash inside of
On 15 May 2017 at 15:26, Eliot Miranda wrote:
> Try something like
>
> shellCommand: 'bash -c ''ls ~''';
>
But then that would run ls inside of bash inside of the system shell
(/bin/sh), wouldn't it? What's the point?
--
Damien Pollet
type less, do more [ | ]
> On May 15, 2017, at 5:16 AM, Denis Kudriashov wrote:
>
>
> 2017-05-15 14:04 GMT+02:00 Mariano Martinez Peck :
>> Denis, you can also have shortcut methods to call shell from OSSubprocess.
>> See the tests under "tests - shell" protocol.
>
> I
2017-05-15 14:04 GMT+02:00 Mariano Martinez Peck :
> Denis, you can also have shortcut methods to call shell from OSSubprocess.
> See the tests under "tests - shell" protocol.
I tried this:
OSSUnixSubprocess new
shellCommand: 'ls ~';
redirectStdout;
runAndWaitOnExitDo: [
Denis, you can also have shortcut methods to call shell from OSSubprocess.
See the tests under "tests - shell" protocol.
Cheers,
On Mon, May 15, 2017 at 8:00 AM, Denis Kudriashov
wrote:
>
> 2017-05-15 12:13 GMT+02:00 K K Subbu :
>
>> ~ is a shell
2017-05-15 12:10 GMT+02:00 teso...@gmail.com :
> Hi Denis,
>the ~ (tilde) is expanded by the shell, a running process should expand
> it. In the case of the command line tools they don't expand it, as they
> expect the shell to expand it before calling.
>
> Check
On Monday 15 May 2017 03:31 PM, Denis Kudriashov wrote:
It returns empty string and console report:
ls: cannot access ~: No such file or directory
Any idea why it not works properly? (from command line "ls ~" returns
expected files).
~ is a shell language synonym for $HOME. Both are
Hi Denis,
the ~ (tilde) is expanded by the shell, a running process should expand
it. In the case of the command line tools they don't expand it, as they
expect the shell to expand it before calling.
Check
https://www.gnu.org/software/bash/manual/html_node/Tilde-Expansion.html
and
Little problem which I not understand. Maybe you can explain. Path '~' is
not recognizied in ls command:
OSSUnixSubprocess new
command: '/bin/ls';
arguments: #('~');
redirectStdout;
runAndWaitOnExitDo: [ :process :outString |
outString
]
I just checked. It works perfectly.
One notice for API:
OSSUnixSubprocess new
command: '/bin/ls';
arguments: #('-la' '/Users');
redirectStdout;
runAndWaitOnExitDo: [ :process :outString |
outString
]
Why you are not return result of
I don't know. Can you at least try for the first time in a 32 bits ARM
?
On Fri, May 12, 2017 at 5:00 AM, Denis Kudriashov
wrote:
> Hi.
>
> I decided to ask before I will try it.
>
> Best regards,
> Denis
>
--
Mariano
http://marianopeck.wordpress.com
Hi.
I decided to ask before I will try it.
Best regards,
Denis
23 matches
Mail list logo