Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corrupt952/7357825 to your computer and use it in GitHub Desktop.
Save corrupt952/7357825 to your computer and use it in GitHub Desktop.
#!/bin/bash
shopt -s expand_aliases
# バージョンだけをするためのコマンドエイリアス
alias cutcut="cut -d',' -f2 | cut -d' ' -f3 | head -n 1"
# 抽出
CHANGE_LOG=`curl -s https://raw.github.com/joyent/node/master/ChangeLog | \egrep -e 'Version [0-9]+\.[0-9]+\.[0-9]+'`;
# 最新の安定版を抽出
STABLES=`echo "${CHANGE_LOG}" | grep Stable | cutcut`
# 最新の不安定版を抽出
UNSTABLES=`echo "${CHANGE_LOG}" | grep Unstable | cutcut`
echo "${STABLES}"
echo "${UNSTABLES}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment