Re: [BUG][SHELL] Could Others Please Test This OS X/Linux
Maybe shell has a different home directory than lc? Pete lcSQL Software On Sep 30, 2014 11:54 PM, "Kay C Lan" wrote: > Thanks gentlemen, that's enough to start the ball rolling. > > May I assume Scott and Tim that your LC resides in the System level > Applications folder. Mine resides in the User level Applications > folder and may be an extra clue as to why, for me, Terminal > LC, > whilst for you both it's Terminal < LC. > > ___ > use-livecode mailing list > use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: [BUG][SHELL] Could Others Please Test This OS X/Linux
Kay C Lan wrote: But then why is this not the case with Linux? I believe it is. And even if one sets up their paths so that LC starts with $HOME as their default directory, the default directory is changeable by any script at any time, so a note reminding users to explicitly set that path when calling shell functions that rely on it may be useful (or any other file I/O routines). -- Richard Gaskin Fourth World Systems LiveCode training and consulting: http://www.fourthworld.com Webzine for LiveCode developers: http://www.LiveCodeJournal.com Follow me on Twitter: http://twitter.com/FourthWorldSys ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: [BUG][SHELL] Could Others Please Test This OS X/Linux
On 10/01/2014 08:09 AM, Kay C Lan wrote: But then why is this not the case with Linux? For Linux users who have installed "single user", in their HOME directory, the defaultfolder is their HOME directory.. Those who have installed for all users, in /opt, will run into these kinds of issues, at least sometimes, perhaps depending on what you're attempting to do with shell(). The defaultfolder in an /opt install is "/opt/runrev/" and 'put shell("find $PWD")' returns file not found errors. Warren ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: [BUG][SHELL] Could Others Please Test This OS X/Linux
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 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 : >> >> >>> On 1 Oct 2014, at 04:17, Kay C Lan 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@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: [BUG][SHELL] Could Others Please Test This OS X/Linux
$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 : > > >> On 1 Oct 2014, at 04:17, Kay C Lan 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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: [BUG][SHELL] Could Others Please Test This OS X/Linux
On 1 Oct 2014, at 04:17, Kay C Lan 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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: [BUG][SHELL] Could Others Please Test This OS X/Linux
On Wed, Oct 1, 2014 at 1:54 PM, Kay C Lan wrote: > Thanks gentlemen, that's enough to start the ball rolling. Bug #13572 Scott, Tim, Warren and Richard I've included your findings. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: [BUG][SHELL] Could Others Please Test This OS X/Linux
Thanks gentlemen, that's enough to start the ball rolling. May I assume Scott and Tim that your LC resides in the System level Applications folder. Mine resides in the User level Applications folder and may be an extra clue as to why, for me, Terminal > LC, whilst for you both it's Terminal < LC. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: [BUG][SHELL] Could Others Please Test This OS X/Linux
On 09/30/2014 10:17 PM, Kay C Lan wrote: Before I go ahead and submit a bug report I'd like others to test and report their findings. openSUSE, LiveCode 6.6.2 Redirected the output to files. Results are identical, except for the extra file created by running the initial 'find $PWD > pwdtest.txt'. 91,426 vs. 91,427. Running: put shell("find $PWD") into tStore put the number of lines of tStore is also the same except for the second file created in the previous step and a couple of other files created by the system as it tracks recently used applications and documents. (This output was also stored to a file and all files were compared using a diff tool.) Warren ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: [BUG][SHELL] Could Others Please Test This OS X/Linux
Interesting. OSX 10.7.5 Terminal: 100,168 lines LC Community 6.1: 294,140 LC Community 7.0 dp5: 294,140 However a quick check of the LC results shows files from /Applications/ , not /Users/. The Terminal results 'correctly' (I assumed) list files from /Users/. Hope this helps Tim Selander Tokyo, Japan On 14/10/01 12:17, Kay C Lan wrote: Before I go ahead and submit a bug report I'd like others to test and report their findings. This is just a simple shell script which should list the entire contents (folders and files) of the Users account. In 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. I'm on OS X 10.9.5 LC 6.6.3 Richard Gaskin reported a much smaller difference and in the opposite direction on Linux (not sure the specific flavour or LC version) On Tue, Sep 30, 2014 at 11:44 PM, Richard Gaskin wrote: LC shell call: 113079 lines Terminal output: 113041 lines All I need is you OS, LC Version, No of lines via Terminal, No of lines via LC. Thanks ___ use-livecode mailing list use-livecode@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
[BUG][SHELL] Could Others Please Test This OS X/Linux
Before I go ahead and submit a bug report I'd like others to test and report their findings. This is just a simple shell script which should list the entire contents (folders and files) of the Users account. In 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. I'm on OS X 10.9.5 LC 6.6.3 Richard Gaskin reported a much smaller difference and in the opposite direction on Linux (not sure the specific flavour or LC version) On Tue, Sep 30, 2014 at 11:44 PM, Richard Gaskin wrote: > > LC shell call: 113079 lines > Terminal output: 113041 lines > All I need is you OS, LC Version, No of lines via Terminal, No of lines via LC. Thanks ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode