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 http://www.davidverhasselt.com/expanding-a-leading-tilde-in-cc/ Cheers, Pablo On Mon, May 15, 2017 at 12:01 PM, Denis Kudriashov <[email protected]> wrote: > 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 > ] > > > 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). > > 2017-05-15 11:52 GMT+02:00 Denis Kudriashov <[email protected]>: > >> 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 block? It would be very handy >> (here it is an OSSUnixSubprocess instance). >> >> >> >> 2017-05-12 14:18 GMT+02:00 Mariano Martinez Peck <[email protected]>: >> >>> mmmm 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 <[email protected]> >>> wrote: >>> >>>> Hi. >>>> >>>> I decided to ask before I will try it. >>>> >>>> Best regards, >>>> Denis >>>> >>> >>> >>> >>> -- >>> Mariano >>> http://marianopeck.wordpress.com >>> >> >> > -- Pablo Tesone. [email protected]
