annotate bni-update @ 11:1b8c5c3afaf5

Round up
author nanaya <me@myconan.net>
date Fri, 17 Jun 2016 10:36:02 +0900
parents a696cc8f1ee1
children 4391020b8ebd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents:
diff changeset
1 #!/bin/sh
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents:
diff changeset
2
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents:
diff changeset
3 set -e
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents:
diff changeset
4 set -u
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents:
diff changeset
5
6
a696cc8f1ee1 Enforce basic paths
nanaya <me@myconan.net>
parents: 5
diff changeset
6 PATH="${PATH}:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin"
a696cc8f1ee1 Enforce basic paths
nanaya <me@myconan.net>
parents: 5
diff changeset
7
4
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents:
diff changeset
8 _outdir="$(dirname "${0}")"
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents:
diff changeset
9
5
f6e6bf7f038b Silence curl
nanaya <me@myconan.net>
parents: 4
diff changeset
10 curl -s http://bni.co.id/informasivalas.aspx \
4
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents:
diff changeset
11 | grep JPY \
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents:
diff changeset
12 | sed -e 's/[^0-9]*\([0-9][0-9.]*\)[^0-9].*/\1/' \
3be5d1679ce0 Add bni, rewrite javascript
nanaya <me@myconan.net>
parents:
diff changeset
13 > "${_outdir}/bni-jpyidr.txt"