Created
January 31, 2019 20:16
-
-
Save karthikeyann/93be42bc2c301342ade540717d6e715c to your computer and use it in GitHub Desktop.
EOD EQUITIES data from NSE website (get all bhavcopy files of the year)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bash | |
YEAR=2018 | |
for MONTH in JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC | |
do | |
for d in {1..31} | |
do | |
foo=$(printf "%02d" $d) | |
curl -O "https://www.nseindia.com/content/historical/EQUITIES/${YEAR}/${MONTH}/cm${foo}${MONTH}${YEAR}bhav.csv.zip" | |
done | |
done | |
find . -name "*.csv.zip" -size -2k -delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment