macOS Command Line – Programming Languages Available from Terminal

command linemacosmojavescript

I need to do a few little scripts on my Mac but I don't really want to install Xcode or Python for a full environment, just a quick command line deal.
Does macOS come with anything suitable out of the box?

As an example I want to process files in a directory and do some custom logic.

Best Answer

Terminal runs the Unix shell, (bash, zsh, and others) which is obviously a command line scripting environment, which can execute complex scripts, particularly file processing.

Python 2.7 comes bundled with MacOS, and always has done. Future?.

Ruby, Perl are also included.

AppleScript and its JavaScript equivalent (docs) are also there out-of-the box.