Quantcast
Channel: Bashタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 2830

yahoo株式 ある特定銘柄をコマンドラインでみるシェル

$
0
0
xxxx.Tは、銘柄コードです。jqコマンドのインストールが必要です。 --- file --- #!/bin/bash cur=$(curl -s https://finance.yahoo.co.jp/quote/xxxx.T|sed 's/[&;"]/\n/g'|grep stock_price|uniq|grep -o '[0-9]+') echo $cur pre=$(curl -s https://finance.yahoo.co.jp/quote/xxxx.T|grep -m1 PRELOADED|sed s/window.PRELOADED_STATE//|sed s/=//|jq|grep closePrice|tail -1|grep -o '[0-9]+') echo $pre echo $((cur-pre))

Viewing all articles
Browse latest Browse all 2830

Latest Images

Trending Articles