<html>
    <head>
      <base href="http://bugzilla.scilab.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:sgougeon@free.fr" title="Samuel GOUGEON <sgougeon@free.fr>"> <span class="fn">Samuel GOUGEON</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - Two consecutive inputs fail to work"
   href="http://bugzilla.scilab.org/show_bug.cgi?id=10945">bug 10945</a>
                <br><br>
                ---------- Bug Summary ----------- <br>Two consecutive inputs fail to work <br><br>

          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>WORKSFORME
           </td>
         </tr></table>
      <p>
        <div>

            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - Two consecutive inputs fail to work"
   href="http://bugzilla.scilab.org/show_bug.cgi?id=10945#c9">Comment # 9</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WORKSFORME - Two consecutive inputs fail to work"
   href="http://bugzilla.scilab.org/show_bug.cgi?id=10945">bug 10945</a>
              from <span class="vcard"><a class="email" href="mailto:sgougeon@free.fr" title="Samuel GOUGEON <sgougeon@free.fr>"> <span class="fn">Samuel GOUGEON</span></a>
</span></b>
        <pre>(In reply to ruben from <a href="show_bug.cgi?id=10945#c7">comment #7</a>)
<span class="quote">> In the sci file:
> function report=test()

>         userAnsw = input( "Please confirm by typing ""y""" ,"s")
>         if userAnsw=="y"
>             if input( 'If you are sure, type ""y"" again ',"s")=="y"
>                 report = "Yeah !";
>             end
>         end
> endfunction

> Bash file to run:
> #!/bin/bash
> scilab -nwni -e "exec preamble.sce;getd('.');test();"</span >

The zipped test.sh you have posted is not this one. It contains
"scilab -nwni -e "exec preamble.sce; test();"

So?
With "exec preamble.sce;getd('.');test();", you will run twice getd(".");
By the way, if there are other functions present where the preamble is located,
they will be loaded as well.
So, the context is unclear.

Why don't you put getd('.'); directly in the -e string, instead of performing preamble.sce that contains only this?
Or even exec test.sci; test()
?

When running a Scilab 6.0.1 session from the Windows shell with
<span class="quote">>c:\Scilab\bin\scilab -nwni -e "exec test.sci; test()"</span >

test() and its result behave as expected.

Please reopen and explain clearly what you were exactly doing, what was is the current directory when you did getd("."), whether you did twice
getd(".") or not, etc.
As Sylvestre has already noted, the description of the report is presently very confused, complicated, and ambiguous.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are watching all bug changes.</li>
      </ul>
    </body>
</html>