© Joaquin Menchaca, 2014
This is my cumulative installation guide to getting scripting languages for your platform.
You'll need to be confortable using the shell environment, whether on Windows or Linux/Unix environment. You should be able to do typical tasks like:
- interacting with shell environment
- sourcing shell scripts (Unix/Linux)
- configure shell environment:
.profile,.bashrc
- configuring environment variables
- user and system environment (Windows)
- exporting environment variables (Unix/Linux)
- adjusting
PATH
- creating symbolic links
- using
whichorcommandorenv(Unix/Linux) - escalating privileges
sudo(Unix/Linux)Run as Administrator(Windows)
These scripts should work on Unix, Linux, and Windows.
- Linux
- 📀 Cent OS 6.5
- 📀 Fedora 20 (Heisenbug)
- 📀 Ubuntu 12.04 LTS (Precise Pangolin)
- Mac OS X
- 📀 Mac OS X 10.8.5 (Snow Leopard) with XCode 5.1.1
- 📦 Homebrew
- 📀 Mac OS X 10.9.5 (Maverick) with XCode 6.1
- 📦 Homebrew
- 📀 Mac OS X 10.8.5 (Snow Leopard) with XCode 5.1.1
- Windows
- 📀 Windows 7 (Windows NT 6.1)
- 📦 CygWin
- 📀 Windows 7 (Windows NT 6.1)
- 📦 MSYS
- 📦 GNUWin32 tools
- 📀 Windows 7 (Windows NT 6.1)
On any system, these are the needed tools:
- Application Virtual Machine: Java SE Runtime Environment (
java) - Command Line Tools:
awk,bc,commandcut,data,env,expr,grep,printf,sed,seq,tr,which,wc - Shell Environments:
dash,bash,ksh,tcsh - Scripting Languages:
awk,groovy,perl,php,python,ruby,tclsh
Most Linux and Unix systems will come bundled with most of these tools, or have package management or ports systems that allow for ease to download and install these tools and environments.
For Mac OS X and Windows, there can be some challenges, so the guidelines below may help get the needed packages.
Mountain Lion includes GNU bc 1.06 and BSD flavors of cut, date, expr, grep 2.5.1, printf, sed, seq, tr, and wc.
Mountain Lion includes includes the following scripting languages:
- 📜 Scripting
- 📦
awk20070501 (BSD) - 📦
perl5.12.4 - 📦 PHP (
php) 5.3.28 - 📦
python2.7.2 - 📦
ruby1.8.7 - 📦 TCL (
tclsh) 8.5
- 📦
- 🐚 Shells
- 📦
bash3.2.48 - 📦
csh(tcsh) 6.17 - 📦
ksh93u 2011-02-08
- 📦
Maverick has some of the basic packages required (similar to Mountain Lion) with some newer versions:
- 📜 Scripting
- 📦
perl5.16.2 - 📦
php5.4.24 - 📦
python2.7.5 - 📦
ruby2.0.0p247
- 📦
- 🐚 Shells
- 📦
bash3.2.51
- 📦
There are a few package managers, but these few have capture my interest to document:
Homebrew - single-user package manager with rich community support.
MacPorts - system wide package manager with large robust repository of packages.
Rudix is a relatively new comer and supports Mac OS X native package format for installing applications.
These are environments provide popular shells available on Linux and UNIX (SVR4 or BSD) on Windows.
CygWin simulates a Unix-like environment with popular UNIX tools that were ported to Windows using the CygWin library. Within the CygWin environment, all the needed tools and scripting languages can be installed easily.
The default CygWin 1.7.33 environment has the following tools:
- Tools:
- 📦
bc - 📦
cut(GNU Core Utils) 8.23 - 📦
date(GNU Core Utils) 8.23 - 📦
expr(GNU Core Utils) 8.23 - 📦
grep2.21 (GNU) - 📦
printf(GNU Core Utils)usr/bin/printf - 📦
sed(GNU sed) 4.2.2 - 📦
seq(GNU Core Utils) 8.23 - 📦
tr(GNU Core Utils) 8.23 - 📦
wc(GNU Core Utils) 8.23
- 📦
- Scripting Languages:
- 📦
awk(GNU Awk) 4.1.1 - 📦
dash - 📦
bash4.1.17
- 📦
MSYS, which is bundled with MSYS-Git (GitBash), provides Bash and some popular GNU tools, which use Unix path names, e.g. /c/Ruby21/bin/ruby. The bash environment will map it's installed location, e.g. /c/Program Files/usr/bin to local directories /usr/bin.
The Git Bash (MSYS-Git) comes bundled with the following:
- Tools:
- 📦
cut(GNU text utilities 2.0) - 📦
date(GNU text utilities 2.0) - 📦
expr(GNU text utilities 2.0) - 📦
grep2.4.2 (GNU grep) - 📦
printf - 📦
sed4.2.1 (GNU sed) - 📦
tr2.0 (GNU text utilities 2.0) - 📦
wc2.0 (GNU text utilities 2.0)
- 📦
- Scripting Languages:
- 📦
awk3.0.4 (GNU awk) - 📦
perl5.8.8 - 📦
php(PHP) 5.5.13 - 📦
tclsh(TCL) 8.5
- 📦
UWIN provides a Korn shell environment with some popular Unix tools.The UWIN environment comes with the tools:
- Tools:
- 📦
bc1.0.4 (FSF) - 📦
cut(AT&T Research) 2010-08-11 - 📦
date(AT&T Research) 2011-01-27 - 📦
expr(AT&T Research) 2010-08-11 - 📦
grep(AT&T Research) 2012-05-07 - 📦
printf(AT&T Research) 2009-02-02/usr/bin/printf - 📦
sed(AT&T Research) 2012-03-28 - 📦
seq(AT&T Labs Research) 2012-04-14 - 📦
tr(AT&T Labs Research) 2012-05-31 - 📦
wc(AT&T Research) 2009-11-28
- 📦
- Scripting Languages:
- 📦
awk - 📦
csh
- 📦
GNUWin32 are popular GNU utilities that are ported directly to Windows using Microsoft C Runtime library. They can run under the Windows Command Shell (cmd.exe), and thus work with Windows path names, e.g. C:\Ruby21\bin\ruby.exe
- Tools:
- 📦
bc1.06 - 📦
cut(GNU coreutils) 5.3.0 - 📦
date(GNU coreutils) 5.3.0 - 📦
env(GNU coreutils) 5.3.0 - 📦
expr(GNU coreutils) 5.3.0 - 📦
grep(GNU grep) 2.5.4 - 📦
printf(GNU coreutils) 5.3.0 - 📦
sed(GNU sed) 4.2.1 - 📦
seq(GNU coreutils) 5.3.0 - 📦
tr(GNU coreutils) 5.3.0 - 📦
wc(GNU coreutils) 5.3.0 - 📦
which(GNU which) 2.20
- 📦
- Scripting Languages:
- 📦
awk(GNU Awk) 3.1.6
- 📦
Apt-Cyg is a simple wrapper script that uses the existing CygWin environment to install packages. Within CygWin environment, you can acquire apt-cyg using something like this:
$ cd $USERPROFILE/Downloads
$ ./setup-x86_64.exe -q -P wget
$ wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
$ chmod +x apt-cyg
$ mv apt-cyg /usr/local/bin/Note that the above example uses 64-bit version of the CygWin setup program.
Chocolately are scripts that pull software down from the Internet and install them locally within the Chocolately system. Chocolately requires PowerShell and NuGet. The current instructions (as of December 2014) for installing Chocolately are:
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin- Ubuntu - Precise Pangolin
- OS X with Homebrew - should work for Mountain Lion and Maverick