<commit_before>#!/bin/bash
#
_usage() {
  cat<<EOF
  iTerm2 OSX Installer Script v16.03.08
  <NAME> <EMAIL> 2016
  WARNING: ONLY FOR OSX
  USAGE:
    $ $0 -ih
  OR
    $ sh -c "$(curl -sL )"
  ARGUMENTS:
  -i  | --install : Install iTerm2
  -h  | --help    : Shows this message.
  DESCRIPTION:
  This script will download and install latest (even Beta)
  iTerm2 and whole predefined settings.
EOF
}

INSTALL=0
if [[ ! "$BASH" =~ .*$0.* ]]; then
  while getopts "h?i" opt; do
    case "$opt" in
      h|\?) INSTALL=0
      ;;
      i) INSTALL=1
      ;;
    esac
  done
  shift $((OPTIND-1))
else
  INSTALL=1
fi

if [[ $INSTALL -eq 0 ]]; then
  _usage
  exit 0
fi

if [[ "$OSTYPE" != "darwin"* ]]; then
  echo "This script is ONLY for MAC OSX."
  exit 0
fi

# install iTerm2
dir_app="/Applications/iTerm.app"
if [ -d  "$dir_app" ]; then
  echo '- iTerm2 already exist.'
else
  # get latest iTerm2 download url (even beta)
  # shellcheck disable=SC1003
  url=$(curl -s 'https://www.iterm2.com/downloads.html'|
  grep -e 'iTerm2-[0-9]_[0-9]_[0-9]'|
  sed 's/\"https/\'$'\nhttps/g'|
  sed 's/zip\"></zip\'$'\n/g'|
  grep 'https'|
  sort -t_ -rn -k1,1 -k2,2 -k3,3|
  head -1)
  fname=${url##*/} # get filename
  url=$( printf "%s\n" "$url" | sed 's/ /%20/g') # replace space by %20
  if [ ! -f "$fname" ]; then # if zip file does not exist
  	echo "* Downloading: $fname"
    curl -s -o "$fname" "$url"
  fi
  unzip -qo "$fname" -d "/Applications/"
  rm "$fname"
  echo "* Installed: iTerm2"
fi
<commit_msg>fixed unzip location and $ symbol in usage<commit_after>#!/bin/bash
#
_usage() {
  cat<<EOF
  iTerm2 OSX Installer Script v16.03.08
  <NAME> <EMAIL> 2016
  WARNING: ONLY FOR OSX
  USAGE:
   $ $0 -ih
  OR
   $ sh -c "\$(curl -sL https://git.io/vaT0V)"
  ARGUMENTS:
  -i  | --install : Install iTerm2
  -h  | --help    : Shows this message.
  DESCRIPTION:
  This script will download and install latest (even Beta)
  iTerm2 and whole predefined settings.

EOF
}

INSTALL=0
if [[ ! "$BASH" =~ .*$0.* ]]; then
  while getopts "h?i" opt; do
    case "$opt" in
      h|\?) INSTALL=0
      ;;
      i) INSTALL=1
      ;;
    esac
  done
  shift $((OPTIND-1))
else
  INSTALL=1
fi

if [[ $INSTALL -eq 0 ]]; then
  _usage
  exit 0
fi

if [[ "$OSTYPE" != "darwin"* ]]; then
  echo "This script is ONLY for MAC OSX."
  exit 0
fi

# install iTerm2
dir_app="/Applications/iTerm.app"
if [ -d  "$dir_app" ]; then
  echo '- iTerm2 already exist.'
else
  # get latest iTerm2 download url (even beta)
  # shellcheck disable=SC1003
  url=$(curl -s 'https://www.iterm2.com/downloads.html'|
  grep -e 'iTerm2-[0-9]_[0-9]_[0-9]'|
  sed 's/\"https/\'$'\nhttps/g'|
  sed 's/zip\"></zip\'$'\n/g'|
  grep 'https'|
  sort -t_ -rn -k1,1 -k2,2 -k3,3|
  head -1)
  fname=${url##*/} # get filename
  url=$( printf "%s\n" "$url" | sed 's/ /%20/g') # replace space by %20
  if [ ! -f "$fname" ]; then # if zip file does not exist
  	echo "* Downloading: $fname"
    curl -s -o "$fname" "$url"
  fi
  unzip -qo "$fname" -d /Applications
  rm "$fname"
  echo "* Installed: iTerm2"
fi

{'fraction_non_alphanumeric': 0.18098360655737705, 'fraction_numerical': 0.033114754098360656, 'mean_word_length': 2.602125147579693, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 9, 'https://': 3, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6762323', 'n_tokens_mistral': 1340, 'n_tokens_neox': 1269, 'n_words': 371}