title: creating a bash function to print csv to screen
body: <p>I'm trying to create a bash function that will, once the user inputs an item code, print a csv file to the screen.</p>
  
  <p>For example, when the item code is 526, I want the following to occur.</p>
  
  <pre><code>wget -O stats.zip "http://data.un.org/Handlers/DownloadHandler.ashx?DataFilter=itemCode:526&amp;DataMartId=FAO&amp;Format=csv&amp;c=2,3,4,5,6,7&amp;s=countryName:asc,elementCode:asc,year:desc"
  
  zcat stats.zip
  </code></pre>
  
  <p>Is there a way to encapsulate all of this into one general function? How would one go about this using a bash script? For example, if I pass in the value XYZ, I want my script to do</p>
  
  <pre><code>wget -O stats.zip "http://data.un.org/Handlers/DownloadHandler.ashx?DataFilter=itemCode:XYZ&amp;DataMartId=FAO&amp;Format=csv&amp;c=2,3,4,5,6,7&amp;s=countryName:asc,elementCode:asc,year:desc"
  
  zcat stats.zip
  </code></pre>