Review of a Bash command file

  • Public
By Ian Stewart 149 days ago

The wlug meeting on 24 Feb 2014 featured a presentation of a BASH file. This file utilizes many features of bash making it suitable as a command file to review to gain better knowledge to help you write your own bash files. The bash file,, can be download from here

When running the file on your Linux system, obtain the help information as follows: $ bash DownloadMaps

For examples of the various input parameters: $ bash DownloadMaps -h

The bash file makes calls to linux software utilities:  ping, bc, curl, file, and montage. If these are not included with your current Linux system, then you will be prompted to install them. For example, if you do not have "montage", which is part of "ImageMagick", then you need to...

$ sudo apt-get install imagemagick

This bash file is used to download map tiles and then montage the tiles to make a single image. For an understanding of what "map tiles" are then refer to this presentation.

Warning: This bash file does not correctly handle file paths in which a folder name includes a "space" character.