@stacksofplates said in Bash Script for Stock Market Analysis:
@laksh1999 said in Bash Script for Stock Market Analysis:
@dafyre said in Bash Script for Stock Market Analysis:
@laksh1999 said in Bash Script for Stock Market Analysis:
data=["WIPRO"]
Should this not simply be
data="WIPRO" ?
i can do that,i am trying to download more companies like 50.So need to add through [] only
In bash arrays are defined with parens, like data=("WIPRO"). Then you would need to loop over the items in the array. Something like
for i in ${data[@]}; do nsecli history --symbol $i..... done
This Worked.How to make multiple stock there ?
GNU nano 5.4 #!/bin/bash cd /home/shiva/Documents data=('WIPRO') start_date=2017-01-01 end_date=$(date "+%Y-%m-%d") for i in ${data[@]}; do nsecli history --symbol $i -s $start_date -e $end_date -o 01.wipro.csv done