[Scilab-users] scilex -e instructions with quotes and filesep <== Re: a beginner question

Samuel Gougeon sgougeon at free.fr
Sat Jun 18 16:32:22 CEST 2016


Le 18/06/2016 14:04, philippe a écrit :
> .../...
> - if you start  scilab from the command-line  use the -e option  and
> 'cd' , for example
>
> scilab -e 'cd SCI'
>
> this is equivalent to start scilab and then use "cd SCI"  in the
> console.  be careful to quotes  to handle correctly  strings
> representing paths.
.
Actually, at least for Windows users, the series of instructions 
following the -e option must be quoted with double-quotes ". For an 
unknown reason, single quotes make instructions not being executed. For 
instance,

scilab -e 'cd(""C:\users\myprofile\Desktop"")'


won't execute  cd(""C:\users\myprofile\Desktop"")

whereas
scilab -e "cd(""C:\users\myprofile\Desktop"")"

will.
IMO, the help scilab 
<https://help.scilab.org/docs/6.0.0/en_US/scilab.html> page would 
deserve more information about that. The example given in the page shall 
include an instruction with a literal string delimited with " or ' and 
having the filesep character of the OS and a blank.

BR
Samuel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160618/9552b60c/attachment.htm>


More information about the users mailing list