Skip to content

Instantly share code, notes, and snippets.

@Deleetdk
Last active March 29, 2016 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Deleetdk/61886a1eb294a3119e7cf3b1430ab0cb to your computer and use it in GitHub Desktop.
Save Deleetdk/61886a1eb294a3119e7cf3b1430ab0cb to your computer and use it in GitHub Desktop.
#!/bin/bash
for ID in {1..56}
do
#pad 0's
size = ${#ID}
if [ $size == 1 ]
then
ID = "0" + $ID
fi
#make url
url='http://www.ncdc.noaa.gov/cdo-web/api/v2/stations?limit=1000&offset=1&datasetid=normal_ann&locationid=FIPS%3A'$ID'&sortfield=name …'
#print
echo $url
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment