Re: executables with spaces in path

  • From: <tpgww@xxxxxxxxxxx>
  • To: emelfm2@xxxxxxxxxxxxx
  • Date: Tue, 28 Sep 2010 21:15:56 +1000

On Mon, 27 Sep 2010 23:23:37 -0500
Adam Krolnik <akrolnik@xxxxxxxxx> wrote:

> One needs to have a modifier to expand to a quoted string.
> IIRC, "$@" will expand the arguments within double quotes. Thus arguments
> that
> have spaces will still remain as a single argument.
> 
> E.g.
> 
> test_script 'here is a' 'arg 2 and' '3 and 4'
> 
> if you use "$@" in the script, you would get
> "here is a"
> "arg 2 and"
> "3 and 4"
> 
> instead of 9 arguments.

An external shell (bash etc) may well cope with "$@", but the inbuilt 
interpreter is not so detailed/capable.

Regards
Tom

> 
> 
> On Mon, Sep 27, 2010 at 10:47 PM, <tpgww@xxxxxxxxxxx> wrote:
> 
> > On Mon, 27 Sep 2010 10:14:45 +0300
> > Liviu Andronic <landronimirc@xxxxxxxxx> wrote:
> >
> > > Currently emel fails to run executables that contain a space in path.
> > > For example, c-menu > Run on '/usr/bin/some cool programme/exec' will
> > > fail because it tries to run
> > > /usr/bin/some cool programme/exec
> > >
> > > If it tried to execute
> > > "/usr/bin/some cool programme/exec"
> > >
> > > it would have went OK. This issue can easily arise when using Wine,
> > > since it contains 'Program files' in the path.
> >
> > Liviu, there needs to be some way to parse the command string, in order to
> > distinguish between the executable application, and any argument(s) supplied
> > to it. This gets tricky, when unquoted/unescaped spaces are part of the
> > application path or name.
> >
> > Regards
> > Tom
> >
> >
> > --
> > Users can unsubscribe from the list by sending email to
> > emelfm2-request@xxxxxxxxxxxxx with 'unsubscribe' in the subject field or
> > by logging into the web interface.
> >
> 
> 
> 
> -- 
> Adam Krolnik


-- 
Users can unsubscribe from the list by sending email to 
emelfm2-request@xxxxxxxxxxxxx with 'unsubscribe' in the subject field or by 
logging into the web interface.

Other related posts: