#/bin/bash # Comment your code to make it more easy to understand. wget ftp://something.rar for file in *.tif ; do echo $file ; gdalinfo -mm $file | grep "Min/Max" done