运行 ELKI自动

Running ELKI automatically

我有 25 个文件,我想用相同的设置处理它们,但对于以下脚本,我收到两个错误:


    **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

我对bash没有太多经验,可能是我的bash脚本有错误。

您似乎在某些行的换行符 \ 字符后有一个空格。如果反斜杠后有空格,转义将应用于它们而不是换行符,命令将不会在下一行继续。

# 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