"how to grep data from site" Code Answer's
You're definitely familiar with the best coding language Shell/Bash that developers use to develop their projects and they get all their queries like "how to grep data from site" answered properly. Developers are finding an appropriate answer about how to grep data from site related to the Shell/Bash coding language. By visiting this online portal developers get answers concerning Shell/Bash codes question like how to grep data from site. Enter your desired code related query in the search bar and get every piece of information about Shell/Bash code related question on how to grep data from site.
how to grep data from site
#!/bin/bash
wget -q -O hkindex.html http://www.aastocks.com/EN/market/HKIndex.aspx?Index=VHSI
rm -f cq
cat hkindex.html | grep -A 23 '' > indextable
#cat indextable | grep '>VHSI<' > vhsivalue
cat indextable | grep '>HSI<' | awk -F '[<|>]' '{print $3 "\t" $7}' > hsis
cat indextable | grep '>HS Red-chip<' | awk -F '[<|>]' '{print $3 "\t" $7}' >> hsis
cat indextable | grep '>HSCEI<' | awk -F '[<|>]' '{print $3 "\t" $7}' >> hsis
cat indextable | grep '>GEM<' | awk -F '[<|>]' '{print $3 "\t" $7}' >> hsis
cat indextable | grep '>HSI FIN<' | awk -F '[<|>]' '{print $3 "\t" $7}' >> hsis
cat indextable | grep '>HSI UTI<' | awk -F '[<|>]' '{print $3 "\t" $7}' >> hsis
cat indextable | grep '>HSI PROP<' | awk -F '[<|>]' '{print $3 "\t" $7}' >> hsis
cat indextable | grep '>HSI COM&IND<' | awk -F '[<|>]' '{print $3 "\t" $7}' >> hsis
cat indextable | grep '>VHSI<' | awk -F '[<|>]' '{print $3 "\t" $7}' >> hsis
cat hsis
Source: sites.google.com
how to grep data from site
#!/bin/bash
#filename: get_quote.sh
#author: Chao Wang
rm -f $1quote.html
wget -q -O $1quote.html http://www.aastocks.com/en/stock/DetailQuote.aspx?symbol=$1
cat $1quote.html | grep '' -B 1 | grep '[0-9].[0-9]' | awk -F ' - ' '{print "StockCode: " $1}'
cat $1quote.html | grep '>Last]' '{print "LastPrice: " $7}'
cat $1quote.html | grep '>Lot Size' -A 1 | grep '[0-9].[0-9]' | awk -F '[<|>]' '{print "LotSize: " $3}'
cat $1quote.html | grep '>Spread' -A 1 | grep '[0-9]/[0-9]' | awk -F '[<|>]' '{print "Spread: " $3}'
cat $1quote.html | grep '>P/E Ratio' -A 1 | grep '[0-9].[0-9]' | awk -F '[<|>]' '{print "PERatio: " $3}'
cat $1quote.html | grep '>EPS' -A 1 | grep '[0-9].[0-9]' | awk -F '[<|>]' '{print "EPS: " $3}'
cat $1quote.html | grep '>Last Update:<' -A 1 | grep '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]' | awk -F '[<|>]' '{print "LastUpdateTime: " $3}'
rm -f $1quote.html
Source: sites.google.com
All those coders who are working on the Shell/Bash based application and are stuck on how to grep data from site can get a collection of related answers to their query. Programmers need to enter their query on how to grep data from site related to Shell/Bash code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about how to grep data from site for the programmers working on Shell/Bash code while coding their module. Coders are also allowed to rectify already present answers of how to grep data from site while working on the Shell/Bash language code. Developers can add up suggestions if they deem fit any other answer relating to "how to grep data from site". Visit this developer's friendly online web community, CodeProZone, and get your queries like how to grep data from site resolved professionally and stay updated to the latest Shell/Bash updates.