[Gambas-user] new Quote.Shell()

Benoit Minisini gambas at ...1...
Sun Dec 3 12:32:46 CET 2006


On Sunday 03 December 2006 12:25, Stefano Palmeri wrote:
> Alle 14:20, sabato 2 dicembre 2006, Benoit Minisini ha scritto:
> > To send it to a shell, use:
> >
> > SHELL "cd " & Quote.Shell(Application.Dir) & ";" & MyCommand
> >
> > Quote.Shell() is a function that quotes a string for a shell command. You
> > will get it in the next version.
>
> Hi, Benoit.
>
> Little question: the Quote.Shell() function will be mandatory
> from next Gambas version?
> I mean:
>
> SHELL "cd " & user.Home
>
> will give an error?
>
>
> Regards,
>
> Stefano Palmeri
>

SHELL pass its argument to "/bin/sh", so quoting is mandatory.

Read 'man bash' to more information about quoting inside bash for example.

With Quote.Shell(), you just don't have to do it by hand.

Regards,

-- 
Benoit Minisini





More information about the User mailing list