I have a Python code that takes multiple input files and merges them into one single output file. I want to create a bash script that adds the input files automatically, without having me to manually write infile1 infile2, etc. Below is what I came up with:
FILE= `find ~/Desktop/folder -name '*.tif'`
for i in $FILE
do
gdal_merge.py -o mosaic -of GTiff $i
done
But for some reason I am getting this error:
Syntax error: word unexpected (expecting ")")