Download, decompress, and put the resulting grabmetar.sh file in your path (e.g. ~/bin). Make sure you have execute permissions.
Spiffy suggestion: uncomment and change path in last line to where the METAR.rwx file is supposed to be for your flight sim. Spiffier suggestion: cron the script so it happens automagically and your sim weather is always current.