<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<font face="Courier New">I think I've finally arrived at a solution
for multiple commands when using dos(). That is to use the
"&&" command separator, which is mentioned in the cmnd.exe
help.<br>
<br>
I think even those of us who have made our first steps in the
personal computing world in the DOS age aren't generally familiar
with this separator because when we used DOS we just wrote our
commands one after the other just pressing Enter between them. The
&& allows a sort of in-line batch.<br>
<br>
This should be mentioned in the dos() documentation and a few more
examples provided.<br>
<br>
Regards,<br>
<br>
Federico Miyara <br>
<br>
<br>
</font>
<div class="moz-cite-prefix">On 28/07/2021 19:54, Federico Miyara
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:fa5ad84d-3a63-71f1-d788-c481919206c3@fceia.unr.edu.ar">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<br>
I do the following:<br>
<br>
comands = "start | dir H:\ "<br>
dos(comands, "-echo")<br>
<br>
Then a command line DOS window opens at the workihg directory of
Scilab, and doesn't close.<br>
<br>
Any further action I attempt with Scilab causes a program crash.
The same happens without the pipe symbol |.<br>
<br>
Regards,<br>
<br>
Federico Miyara<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 28/07/2021 10:57, Lester Anderson
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAE3taFD6nQBzYzEuWncbzCO9Stw2DMahwyocp8Ray+f4zmJayg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<div dir="ltr">Hello all,<br>
<br>
This has been queried previously without an obvious solution.<br>
<br>
For example: [output, bOK]=dos('grdinfo Test_10-FAA.grd')<br>
Fails with bOK = F<br>
<br>
Adding 'start grdinfo Test_10-FAA.grd gives bOK=T but now dos
window console with the result<br>
<br>
The only way to get the out put shown below is to put the
commands into a bathch file:<br>
grd-info.bat (containing the command stream grdinfo
Test_10-FAA.grd<br>
<br>
Such that the dos function becomes: [out,TF]=dos('start
grd-info.bat'); out, TF<br>
<br>
\D_Drive\Geoscience\Scilab>grdinfo Test_10-FAA.grd<br>
Test_10-FAA.grd: Title:<br>
Test_10-FAA.grd: Command: grdsample -R-10/10/-10/10 -I1m
@GMTAPI@-000001 -Gc:\Temp\Test_10-FAA.grd -fg
--GMT_HISTORY=false<br>
Test_10-FAA.grd: Remark:<br>
Test_10-FAA.grd: Pixel node registration used [Geographic
grid]<br>
Test_10-FAA.grd: Grid file format: nf = GMT netCDF format
(32-bit float), CF-1.7<br>
Test_10-FAA.grd: x_min: -10 x_max: 10 x_inc: 0.0166666666667
(1 min) name: longitude n_columns: 1200<br>
Test_10-FAA.grd: y_min: -10 y_max: 10 y_inc: 0.0166666666667
(1 min) name: latitude n_rows: 1200<br>
Test_10-FAA.grd: v_min: -104.96169281 v_max: 456.651062012
name: z<br>
Test_10-FAA.grd: scale_factor: 1 add_offset: 0<br>
Test_10-FAA.grd: format: netCDF-4 chunk_size: 134,134 shuffle:
on deflation_level: 3<br>
<br>
However, even with this workaround, nothing is written to the
variable 'out'. The program 'grdinfo' is in the Windows path,
so should be run without using start. In the past, the
function did work. Basic Windows commands like {out,
TF]=dos('dir') works.<br>
<br>
I have verified that nothing is written to the consolebox. In
addition, this is a new computer and new install of Scilab
6.1.1<br>
Also, the same function under Octave runs correctly as
dos('grdinfo Test_10-FAA.grd'), and I am assuming the Scilab
version should behave the same.<br>
<br>
Since the mailinglists section is no longer functional, I
cannot check for possible solutions or pointers. Apologies if
this is repeating my previous query on the issue.<br>
<br>
Thanks<br>
<br>
Lester<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org" moz-do-not-send="true">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users" moz-do-not-send="true">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br>
<table style="border-top: 1px solid #D3D4DE;">
<tbody>
<tr>
<td style="width: 55px; padding-top: 18px;"><a
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient"
target="_blank" moz-do-not-send="true"><img
src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif"
alt="" style="width: 46px; height: 29px;"
moz-do-not-send="true" width="46" height="29"></a></td>
<td style="width: 470px; padding-top: 17px; color:
#41424e; font-size: 13px; font-family: Arial, Helvetica,
sans-serif; line-height: 18px;">Libre de virus. <a
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient"
target="_blank" style="color: #4453ea;"
moz-do-not-send="true">www.avast.com</a> </td>
</tr>
</tbody>
</table>
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1"
height="1" moz-do-not-send="true"> </a></div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>