Skip to content

Latest commit

 

History

History

README.md

Scripting Box

© Joaquin Menchaca, 2014

Overview

This is my cumulative installation guide to getting scripting languages for your platform.

Required Knowledge

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 which or command or env (Unix/Linux)
  • escalating privileges
    • sudo (Unix/Linux)
    • Run as Administrator (Windows)

Tested Operating Systems

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
  • Windows
    • 📀 Windows 7 (Windows NT 6.1)
      • 📦 CygWin
    • 📀 Windows 7 (Windows NT 6.1)
      • 📦 MSYS
      • 📦 GNUWin32 tools

Required Packages

On any system, these are the needed tools:

  • Application Virtual Machine: Java SE Runtime Environment (java)
  • Command Line Tools: awk, bc, command cut, 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.

Installation Notes

Mac OS X 10.8.5 (Mountain Lion) Notes

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
    • 📦 awk 20070501 (BSD)
    • 📦 perl 5.12.4
    • 📦 PHP (php) 5.3.28
    • 📦 python 2.7.2
    • 📦 ruby 1.8.7
    • 📦 TCL (tclsh) 8.5
  • 🐚 Shells
    • 📦 bash 3.2.48
    • 📦 csh (tcsh) 6.17
    • 📦 ksh 93u 2011-02-08

Mac OS X 10.9.5 (Maverick) Notes

Maverick has some of the basic packages required (similar to Mountain Lion) with some newer versions:

  • 📜 Scripting
    • 📦 perl 5.16.2
    • 📦 php 5.4.24
    • 📦 python 2.7.5
    • 📦 ruby 2.0.0p247
  • 🐚 Shells
    • 📦 bash 3.2.51

Mac OS X Packages

There are a few package managers, but these few have capture my interest to document:

Homebrew

Homebrew - single-user package manager with rich community support.

MacPorts

MacPorts - system wide package manager with large robust repository of packages.

Rudix

Rudix is a relatively new comer and supports Mac OS X native package format for installing applications.

Windows Environments

These are environments provide popular shells available on Linux and UNIX (SVR4 or BSD) on Windows.

Cygnus Windows (CygWin)

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
    • 📦 grep 2.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
    • 📦 bash 4.1.17

MSYS

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)
    • 📦 grep 2.4.2 (GNU grep)
    • 📦 printf
    • 📦 sed 4.2.1 (GNU sed)
    • 📦 tr 2.0 (GNU text utilities 2.0)
    • 📦 wc 2.0 (GNU text utilities 2.0)
  • Scripting Languages:
    • 📦 awk 3.0.4 (GNU awk)
    • 📦 perl 5.8.8
    • 📦 php (PHP) 5.5.13
    • 📦 tclsh (TCL) 8.5

UWIN

UWIN provides a Korn shell environment with some popular Unix tools.The UWIN environment comes with the tools:

  • Tools:
    • 📦 bc 1.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

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:
    • 📦 bc 1.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

Windows Packages

Apt-Cyg

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

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

Installation Guides

Linux

Mac OS X

Windows