在 Mac 上运行批处理文件 [英] Running batch files on Mac

查看:176
本文介绍了在 Mac 上运行批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用 Mac 并设置了我的开发环境.我只想知道是否可以在 Mac 上创建类似批处理的文件.

I just moved on Mac and setting up my development environment. I just want to know if it's possible to create batch-like files on Mac.

在 Windows 上,我有一个批处理脚本,它首先使用 ionCube 运行编码,然后使用 Create Synchronicity 将文件同步到已安装的驱动器.现在我也有 ionCube,但我有 FreeFileSync,而不是 Create Synchronicity.

On Windows I had a batch script, which first run encoding with ionCube and then syncs filed to mounted drive with Create Synchronicity. Now I also have ionCube, but instead of Create Synchronicity I have FreeFileSync.

我已经创建了要运行的文件,但我不知道在哪里写一些执行命令.在 Windows 上,我的批处理中有以下命令:

I have created the files, which I want to run, but I don't know where to write some execution commands. On Windows I had following command in my batch:

"C:/Program Files (x86)/ionCube Pro PHP Encoder 9.0.2/ioncube_encoder56.exe" --exclude "*.*" --encode "*.php" --encode "*.php4" --encode "*.php5" --encode "*.inc" --ignore "*~" --ignore "~*" --ignore "*.bak" --ignore "*.tmp" --ignore "*.iep" --ignore "CVS/" --ignore "RCS/" --ignore ".svn/" --ignore ".*/" --ignore "*.swp" --dynamic-key-errors "simple" --without-loader-check --no-doc-comments --obfuscate "linenos" --replace-target --allowed-server "10.201.238.5" --ignore "@/CHANGELOG.md" --ignore "@/wms/" "C:/xampp/htdocs/dev" -o "C:/xampp/htdocs/dev-encoded" %*

"C:\Program Files (x86)\Create Software\Create Synchronicity\Create Synchronicity.exe" /silent /run "Code protected"

如果您对在 Mac 上使用批处理脚本有所了解,请帮助我.提前致谢!

If you know something about using the batch scripts on Mac, please help me. Thanks in advance!

推荐答案

Mac 是一个 Unix 系统,支持许多不同的批处理脚本工具.在大多数 Linux 版本中也可以找到的基本命令是 Bourne-Again Shell (bash),它也是 Mac(以及大多数 Linux 版本)上的默认命令提示符.Bash 提供了一个功能齐全的脚本环境,该环境在 Mac 内外都得到了广泛使用.如果 bash 不符合您的喜好,还有其他几种选择,例如 Korn shell、tcsh 和 Python.

The Mac is a Unix system and supports many different batch scripting tools. The basic one, which is also found on most versions of Linux, is the Bourne-Again Shell (bash), which is also the default command prompt on the Mac (and most versions of Linux). Bash provides a fully-functional scripting environment that has seen widespread use both on and off the Mac. If bash doesn't strike your fancy, there are several other options, such as Korn shell, tcsh and Python.

这篇关于在 Mac 上运行批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆