I have 25 files and I want to process them with same settings but for the following script I receive two errors:
**Stopping execution because of configuration errors. optics.sh: line 9: -algorithm: command not found optics.sh: line 14: -optics.minpts: command not found**
#!/bin/bash for file in ~/ELKI/locationData/csv/*.csv; do name=${file##*/} java -jar ~/ELKI/elki.jar KDDCLIApplication \ -dbc.in "$file" \ -db.index tree.spatial.rstarvariants.rstar.RStarTreeFactory \ -index.pagefile MemoryPageFileFactory -pagefile.pagesize 512 \ -spatial.bulkstrategy SortTileRecursiveBulkSplit \ -algorithm clustering.optics.OPTICSXi \ -opticsxi.xi 0.05 \ -algorithm.distancefunction geo.LatLngDistanceFunction \ -geo.model SphericalHaversineEarthModel \ -optics.epsilon 100.0 \ -optics.minpts 200 \ -resulthandler ResultWriter -out.gzip \ -out ~/ELKI/locationData/output/${name%.*} done
I don't have much experience with bash, It might be the case that there is an error in my bash script.
It seems you have a whitespace after the line break \
character in certain lines. If there are spaces after the backslash, the escape will apply to them instead of the line break, and the command will not continue on the next line.
# There are spaces after the backslash:
$ echo hello \
hello
$ world
bash: world: command not found
# No spaces after the backslash:
$ echo hello \
> world
hello world