<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    -----BEGIN PGP SIGNED MESSAGE-----<br>
    Hash: SHA1<br>
    <br>
    Le 29/01/2013 11:59, Alexandros Drymonitis a &#65513;crit :<br>
    <span style="white-space: pre;">&gt; I don't really understand the
      meaning of 'context' (not the actual word, but the way you're
      using it)..how are these contexts accessible? How are commands
      being executed when sent to the same object?<br>
      &gt;<br>
      &gt;<br>
      &gt; On Tue, Jan 29, 2013 at 12:41 PM, IOhannes m zmoelnig
      &lt;<a class="moz-txt-link-abbreviated" href="mailto:zmoelnig@iem.at">zmoelnig@iem.at</a> <a class="moz-txt-link-rfc2396E" href="mailto:zmoelnig@iem.at">&lt;mailto:zmoelnig@iem.at&gt;</a>&gt; wrote:<br>
      &gt;<br>
      &gt; On 2013-01-29 11:23, Alexandros Drymonitis wrote:<br>
      &gt; &gt; I checked the help patch of [shell], but if I send a cd
      command<br>
      &gt; &gt; for example, I don't think that something really
      happens. I<br>
      &gt; &gt; actually would like to run a script from within Pd, but
      what I<br>
      &gt; &gt; understand is that this can't be really done, is it so?
      Can anyone<br>
      &gt; &gt; demonstrate something like this?<br>
      &gt;<br>
      &gt; that's exactly the point: with [shell] you _should_ run
      scripts.<br>
      &gt;<br>
      &gt; each command you send to [shell] will open a new "context".<br>
      &gt;<br>
      &gt; so if you send it a "cd ..", it will create a new context (in
      your<br>
      &gt; working directory, lets call it ${WD}), move one directory up
      (so we<br>
      &gt; are now in ${WD}/.., report any output (not very much in this
      case),<br>
      &gt; and close the context.<br>
      &gt; if you then send it a "pwd", it will create a new context (in
      your<br>
      &gt; working directory ${WD}), print the PWD and close the
      context.<br>
      &gt;<br>
      &gt; obviously your "cd.." did not affect "pwd", as they have been
      executed<br>
      &gt; in different contexts.<br>
      &gt;<br>
      &gt; in order to do anything more complex, you have to create a<br>
      &gt; script-file, and run this via [shell].<br>
      &gt; e.g.<br>
      &gt; &lt;snip&gt;<br>
      &gt; #!/bin/sh<br>
      &gt; cd ..<br>
      &gt; pwd<br>
      &gt; &lt;/snip&gt;<br>
      &gt;<br>
      &gt; and run "myscript.sh" via [shell] should give you ${WD}/..<br>
      &gt;<br>
      &gt; fgamsdr<br>
      &gt; IOhannes<br>
      &gt;<br>
      &gt;<br>
      &gt; _______________________________________________<br>
      &gt; <a class="moz-txt-link-abbreviated" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> <a class="moz-txt-link-rfc2396E" href="mailto:Pd-list@iem.at">&lt;mailto:Pd-list@iem.at&gt;</a> mailing list<br>
      &gt; UNSUBSCRIBE and account-management -&gt;
      <a class="moz-txt-link-freetext" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a><br>
      &gt;<br>
      &gt;<br>
      &gt;<br>
      &gt;<br>
      &gt; _______________________________________________<br>
      &gt; <a class="moz-txt-link-abbreviated" href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
      &gt; UNSUBSCRIBE and account-management -&gt;
      <a class="moz-txt-link-freetext" href="http://lists.puredata.info/listinfo/pd-list">http://lists.puredata.info/listinfo/pd-list</a></span><br>
    <br>
    Hello,<br>
    <br>
    By 'context', it is as if you start each time from the beginning
    (same 'initialization').<br>
    You see that when you open a new shell by creating a new terminal
    window :<br>
    1) open new terminal window<br>
    2) enter 'cd ..' then return<br>
    3) enter 'pwd' then return<br>
    4) close terminal window<br>
    5) open new terminal window<br>
    6) enter 'pwd' then return<br>
    <br>
    As you can see the values returned by pwd are not the same because,
    each time you open a terminal window, you open a new shell.<br>
    It is the same under Pd and the object [shell], each time you send a
    message to [shell], each time you open a new shell.<br>
    That's why you need a script if you need to execute a sequence of
    several commands.<br>
    ++<br>
    <br>
    Jack<br>
    <br>
    -----BEGIN PGP SIGNATURE-----<br>
    Version: GnuPG v1.4.11 (GNU/Linux)<br>
    Comment: Using GnuPG with Thunderbird - <a class="moz-txt-link-freetext" href="http://www.enigmail.net/">http://www.enigmail.net/</a><br>
    <br>
    iQEcBAEBAgAGBQJRB7eFAAoJEOuluecjw8GU7CoIAJcT9AYfR7QQ1LkrUOmMxTul<br>
    fhqfkhx13MeHa/N30H2D+mHf0iM6OqHcXiVASJcsOinMSyLnPbw313dhuCgmccLl<br>
    vc51hB5nScrSfn+xpOetALxjHXQ9sq+cr8cXboQdGdYEbChyuITAifaN0KihsMWw<br>
    O1+/nSA9bfr9BfMG7G+s+u/u+938a2rU3whp4VdFB5eA0kZkX5YBeD46A6vByBXE<br>
    sxoZg0MlgkKaUdLc60aMrM5LU1PWQmK8aA1QiqEd4ebYF3oN79VxZh7ekkV2DGp2<br>
    KOYxfWHzLLSpPJhDtZDoF1zWJHyhLQ74uIycFwOV+TQOfj3/APD7AN1qXrDwsbQ=<br>
    =II3H<br>
    -----END PGP SIGNATURE-----<br>
    <br>
  </body>
</html>