Skip to content

Commit

Permalink
download_xml.sh - modified to pull year automatically so I don't need…
Browse files Browse the repository at this point in the history
… to kee[ updating the year variable every january
  • Loading branch information
DanBeard committed Feb 22, 2017
1 parent 19b5573 commit 2fbc061
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions download_xml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ mkdir -p dbs
cd dbs
rm *.xml

for i in $(seq -f "%02g" 2 17)
year=`date +"%Y"`
for i in $(seq -f "%04g" 2002 $year)
do
wget https://nvd.nist.gov/download/nvdcve-20$i.xml.gz
gunzip nvdcve-20$i.xml.gz
wget https://nvd.nist.gov/download/nvdcve-$i.xml.gz
gunzip nvdcve-$i.xml.gz
done

rm *.gz

0 comments on commit 2fbc061

Please sign in to comment.