Batch on a Mac

Status
Not open for further replies.

MarioMaster

New Member
Messages
181
Reaction score
0
Points
0
How do you run a batch (.bat) file on a Mac? I know you have to do something in Terminal, but what:dunno:?
 

HomerJ

New Member
Messages
181
Reaction score
0
Points
0
I doubt you can. If it even has an interpreter for DOS/Windows batch files, they probably depend on DOS/Windows only programs and commands that Mac wouldn't have.

Mac is Unix-like, so it probably uses has a bourne-compatible shell. Did the script you are trying to run come with another file with the extension .sh? If so, try that one, it should work.

You would run it by opening whatever terminal emulator you use and navigating to the directory where the script is and then executing it. You may have to chmod it to make it executable. Here is what you should type:
Code:
cd /path/to/script
chmod +x ./script.sh
./script.sh
Replace the path and the name of the script with the actual names.
 
Status
Not open for further replies.
Top