Reputation: 18178
I need to write a small script that renames some files in a directory. This script needs to be run on Mac and Windows.
What is the best scripting language for this? I want to write something that runs just by calling it and there is no need to install anything else.
For example, writing a Perl script and compiling it to run on Windows and then compiling it to run on Mac. Can I do this?
Any other, more elegant solution?
Upvotes: 1
Views: 936
Reputation: 386396
Nothing matches your criteria. You will need to install something (e.g. perl
) if you want something that runs on both systems.
If you had perl
on both systems, you could indeed write a program that runs on both. You wouldn't even need two binaries as you suggest since Perl programs are distributed as source. (perl
compiles them when it loads them, and even then, they are compiled to the same form on all systems.)
Upvotes: 4