I have a bat script that I'd like to make work on windows/Mac/linux, but I read .bat is only for windows. How can I make this script work on Mac and linux, or what type of script can I write that would work on all 3.
No such beast. Windows doesn't support the unix-style shell scripts that Mac/Linux use, and Mac/Linux don't have command.com/cmd.exe needed to support .bat files.
There's ways to fake this, like running Wine on mac/linux and cygwin on Windows, but then that's a whole other ball of wax.
If you don't want to step up to a language like C, I would suggest Python as a multi-platform scripting language. It's easy to learn and has lots of generic, multi-platform libraries and functions.
You'll need to install it on Windows, and maybe OS X as well. But it's not difficult in any way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With