Difficulty using shell in Ubuntu Linux

stomfi stomfi at bigpond.com
Wed Feb 22 10:25:02 EST 2006


I have found that using the space token as in
put ($HOME & "/Desktop/folder" & space & "name" & space & "name") 
into MyVar
works as well.
You may have to:
replace return with empty in MyVar

and you with definately have to do this when returning lines from 
the shell into runrev as the shell puts a return at the end of its 
returned string which stops runrev from seeing it as one line.

Also you might want to use the quote token around a Linux variable 
with embedded tokens like spaces that the shell interprets for its 
own language, as quotes stop this from happening in *Nix.

put (quote & $HOMEetc & quote) into MyVar

See the shell man page on quoting using backslash, double and single 
quotes. type "man bash" or "info bash" on the command line to read 
all about using the "bash" shell, or you can read part 1 of my 
"power end user" articles on www.linuxquestions.org to read some 
simplified knowledge about shell basics.

If you use the runrev $HOME variable in your path strings, it makes 
you app portable to any user.

Kind regards
Stomfi


Dave Cope wrote:
> Bob Warren wrote:
> 
>> I now have an explanation as to why the shell in (Ubuntu) Linux seems 
>> to work sometimes, but not others: the HD path to the executable for 
>> launching MUST NOT CONTAIN BLANKS!
>>
>> For example, this works like a charm:
>>
>>   global myVar
>>   put "/home/bob/Desktop/folderwithnospaces/myprog" into myVar
>>   set the defaultFolder to "/home/bob/Desktop/folderwithnospaces"
>>   get shell(myVar)
>>
>> This doesn't work at all:
>>
>>   global myVar
>>   put "/home/bob/Desktop/folder with spaces/yourprog" into myVar
>>   set the defaultFolder to "/home/bob/Desktop/folder with spaces"
>>   get shell(myVar)
>>
>> Exactly the same thing applies to the LAUNCH command.
>>
>> Now what do I do?
>> Any ideas anyone?
>>
>> Bob
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
> 
> Hi Bob,
> 
> This is a guess as I've not got Rev on Linux, but I do use Unix/GNU 
> Linux in general. When specifying spaces on the command line, they need 
> to be escaped.
> 
> For example: ls folder with spaces/
> becomes: ls folder\ with\ spaces/
> 
> So the same might be true for Rev: put "/home/bob/Desktop/folder\ with\ 
> spaces/yourprog" into myVar
> 
> Hope this helps




More information about the use-livecode mailing list