view bni-update @ 20:ee7a8d51b2a6 default tip

Update to latest jquery
author nanaya <me@nanaya.pro>
date Mon, 01 Jul 2019 00:01:32 +0900
parents 4391020b8ebd
children
line wrap: on
line source

#!/bin/sh

set -e
set -u

PATH="${PATH}:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin"

_outdir="$(dirname "${0}")"
_outfile="bni-jpyidr.txt"

curl -s http://www.bni.co.id/id-id/beranda/informasivalas \
  | grep -F '<td class="align-center">JPY</td>' \
  | tail -1 \
  | sed -e 's/.*<td class="align-center">JPY<\/td><td class="align-right">\([0-9,.]*\)<\/td>.*/\1/' \
  | sed -e 's/,/./' \
  > "${_outdir}/${_outfile}.new"

mv "${_outdir}/${_outfile}.new" "${_outdir}/${_outfile}"