João Miguel Pais hat gesagt: // João Miguel Pais wrote:
I also wanted to create a kind of command-line program (I think it might be called "script") that would make the necessary changes in the text files (osc~ -> cycle~ ; correct parameters for atoms ; detection of max signal outlets and inlets ; etc.). Basically just a "replace" command would be necessary. Does anybody know if something like that already exists and can be easily controlled by an "amateur"?
Under Unix a standard for this is the tool "sed", the "stream editor", which now also has found it's was into Mac OS-X. A modern version of sed is perl. Well, perl can do a lot more, but it can also simply replace text in a lot of textfiles.
I think, Perl is also installed on OS-X by default, but has to be installed on W32 systems by the user. OTOH sed might come with WindowsNT/2000. With Perl you would write a textfile called for example "pd2max" and with this content:
s/osc~/cycle/gx; s/old text/new text/;
and then call
$ perl -pi pd2max *.pd
which would make the programmed changes.
Frank Barknecht _ _______footils__