[Scilab-users] the name of a script

Masahiro Fujimoto fujimoto2005 at gmail.com
Wed Mar 16 17:02:30 CET 2016


Thanks Jan A

The following script return what I want to get

******************************
[units,typs,nams]=file();
a=nams(max(grep(nams,'getting')));
b=strsplit(a, [filesep();'.']);
disp(b($-1));
******************************

Best regrds

2016-03-17 0:46 GMT+09:00 Jan Åge Langeland <j-lan at online.no>:

>
>
> On 16.03.2016 15:59, fujimoto2005 wrote:
>
>> Hi,all
>>
>> I executed the script with the execute command of the scinote so it
>> failed.
>> I want to use the execute command of the scinote.
>>
>> I tried
>> [units,typs,nams]=file().
>>
>> But nams are as follows
>>
>> stderr
>> !
>> !
>> !
>> !C:\***\gettingScriptName02.sce  !
>> !
>> !
>> !stdin
>> !
>> !
>> !
>> !stdout
>> !
>>
>> file() is clearly better than my suggestion.
> nams is different in Scilab 5 and Scilab 6 and maybe vary with OS also,
> but since you know a bit about the script name you should be able to find
> it with grep:
>
> nams(max(grep(nams,'getting')))
>
> Jan Å
>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160317/ed84449c/attachment.htm>


More information about the users mailing list