[PD] Can I run scripts with [shell]?

Alexandros Drymonitis adrcki at gmail.com
Tue Jan 29 11:59:49 CET 2013


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?


On Tue, Jan 29, 2013 at 12:41 PM, IOhannes m zmoelnig <zmoelnig at iem.at>wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 2013-01-29 11:23, Alexandros Drymonitis wrote:
> > I checked the help patch of [shell], but if I send a cd command
> > for example, I don't think that something really happens. I
> > actually would like to run a script from within Pd, but what I
> > understand is that this can't be really done, is it so? Can anyone
> > demonstrate something like this?
>
> that's exactly the point: with [shell] you _should_ run scripts.
>
> each command you send to [shell] will open a new "context".
>
> so if you send it a "cd ..", it will create a new context (in your
> working directory, lets call it ${WD}), move one directory up (so we
> are now in ${WD}/.., report any output (not very much in this case),
> and close the context.
> if you then send it a "pwd", it will create a new context (in your
> working directory ${WD}), print the PWD and close the context.
>
> obviously your "cd.." did not affect "pwd", as they have been executed
> in different contexts.
>
> in order to do anything more complex, you have to create a
> script-file, and run this via [shell].
> e.g.
> <snip>
> #!/bin/sh
> cd ..
> pwd
> </snip>
>
> and run "myscript.sh" via [shell] should give you ${WD}/..
>
> fgamsdr
> IOhannes
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAlEHp1UACgkQkX2Xpv6ydvQxewCgoxOK3SpyBVJOD+/WkFCt3CjT
> UPkAoNnAAwJwK9f5kaQNRysEesOexAU5
> =bZxD
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20130129/ecb611b9/attachment.htm>


More information about the Pd-list mailing list