[Gambas-user] How to specify a string constant in an Exec statement
T Lee Davidson
t.lee.davidson at gmail.com
Sun Jul 12 17:26:23 CEST 2020
On 7/12/20 5:26 AM, Bruce wrote:
>
>
> On 12/7/20 6:49 pm, Bruce wrote:
[snip]
>> 3. try in gambas
>> Exec ["get_iplayer","'.*","--type=TV"] To sOutput
>> It's a guess
>>
>> 4. Pay particular attention to the single and double quotes in the above.
>>
>> hth
>> bruce
>>
>> On 12/7/20 5:06 pm, John Rose wrote:
>>> Exec ["get_iplayer", "\".*\"", "--type=TV" To sOutput
>
> p.s. I just realised myself !
> 3. Is not going to work because there is NO SHELL to expand the .*
> read the fine help.
>
As I understand it from a quick read of the man page, the ".*" is a regular expression passed to get-iplayer itself. As such it
does not need to be expanded by a shell.
But, your Exec command is missing a single quote. It should be:
Exec ["get_iplayer","'.*'","--type=TV"] To sOutput
--
Lee
More information about the User
mailing list