如何在Windows和Mac上运行.bat文件


0

我在Matlab程序中使用.bat文件,并且想知道是否无论如何都可以在Windows和Mac计算机上都可以进行此工作(现在它仅适用于Windows),因此我可以在两个系统上运行Matlab程序。.bat文件非常简短。

Answers:


5

.Bat文件是Windows批处理文件或一系列Windows命令。Windows命令不能在Mac上运行。

简而言之,不。

您可以做的是将批处理文件移植到可以在两个操作系统上运行的文件上。例如,一种选择是在两台计算机上都安装Python并编写Python脚本来执行与当前批处理文件相同的功能。


1
Python应该已经在Mac上安装了。您只需要在Windows计算机上安装Python。
詹姆斯·默兹
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.