[BUG][SHELL] Could Others Please Test This OS X/Linux

Kay C Lan lan.kc.macmail at gmail.com
Wed Oct 1 09:09:54 EDT 2014


OK, I see now the relationship with the defaultFolder and I'll update
my bugzilla report to reflect this. But then why is this not the case
with Linux?

Richard suggested a note in the Dictionary and that seems to be
sensible. Currently the Dictionary suggests that if you are have
trouble with shell() then test it in Terminal and in this case it is
only confusing the matter. A further note hilighting the relationship
between the defaultFolder and certain shell commands would be useful.

On Wed, Oct 1, 2014 at 6:42 PM, Håkan Lilegren <Hakan at exformedia.se> wrote:
> $PWD should start at the current working directory, and that is not the same if you run the command in the terminal or if you runit from your program. You will (and should) get different answers. Even if you run in the IDE compared to a standalone.
>
> If you want the home catalog you can use $HOME or ~. If you still get different answers it is of course a bug. Will test when I get to my computer.
>
> Skickat från min iPhone
>
>> 1 okt 2014 kl. 10:47 skrev Fraser Gordon <fraser.gordon at livecode.com>:
>>
>>
>>> On 1 Oct 2014, at 04:17, Kay C Lan <lan.kc.macmail at gmail.com> wrote:
>>>
>>> Terminal enter the following:
>>>
>>> find $PWD
>>>
>>> The output will be on each line the full path of either a Folder or a file.
>>>
>>> I just copied and pasted the output into a Text editor which then
>>> reports the number of lines - in my case it's 527579
>>>
>>> Next, in LC in the msg box
>>>
>>> put shell("find $PWD") into tStore
>>> --put tStore & cr into msg
>>> put the number of lines of tStore after msg
>>>
>>> In my case the output is: 17794.
>>>
>>> Obviously this is a big difference. If you want to check the actual
>>> output you can uncomment the line that will put tStore into msg, but
>>> at this stage I only wish to confirm that the number of lines
>>> (Folders/files) outputed is different.
>>
>> Out of interest - are you setting the defaultFolder before running this? Try running ‘put shell(“echo $PWD”)’ and make sure it is definitely running in your user folder and not /Applications (on OSX, the defaultFolder is initially /Applications).
>>
>> Regards,
>> Fraser
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list