root@RoPi:/tmp# bash -x x.sh + SOURCE='/tmp/test quellordner/' + DESTPATH=/tmp/ziel + FolderCount=1 + FolderFileLimit=5 + FileCount=0 + mkdir -p /tmp/ziel/1 ++ ls '/tmp/test quellordner/' + for f in '$(ls "$SOURCE")' + FileCount=1 + echo 'f: a' f: a + '[' 1 == 5 ']' + '[' 1 -le 5 ']' + cp '/tmp/test quellordner/a' /tmp/ziel/1/ + for f in '$(ls "$SOURCE")' + FileCount=2 + echo 'f: b' f: b + '[' 2 == 5 ']' + '[' 2 -le 5 ']' + cp '/tmp/test quellordner/b' /tmp/ziel/1/ + for f in '$(ls "$SOURCE")' + FileCount=3 + echo 'f: c' f: c + '[' 3 == 5 ']' + '[' 3 -le 5 ']' + cp '/tmp/test quellordner/c' /tmp/ziel/1/ + for f in '$(ls "$SOURCE")' + FileCount=4 + echo 'f: d' f: d + '[' 4 == 5 ']' + '[' 4 -le 5 ']' + cp '/tmp/test quellordner/d' /tmp/ziel/1/ + for f in '$(ls "$SOURCE")' + FileCount=5 + echo 'f: e' f: e + '[' 5 == 5 ']' + FileCount=0 + FolderCount=2 + mkdir -p /tmp/ziel/2 + '[' 0 -le 5 ']' + cp '/tmp/test quellordner/e' /tmp/ziel/2/ + for f in '$(ls "$SOURCE")' + FileCount=1 + echo 'f: f' f: f + '[' 1 == 5 ']' + '[' 1 -le 5 ']' + cp '/tmp/test quellordner/f' /tmp/ziel/2/ + for f in '$(ls "$SOURCE")' + FileCount=2 + echo 'f: g' f: g + '[' 2 == 5 ']' + '[' 2 -le 5 ']' + cp '/tmp/test quellordner/g' /tmp/ziel/2/ + for f in '$(ls "$SOURCE")' + FileCount=3 + echo 'f: h' f: h + '[' 3 == 5 ']' + '[' 3 -le 5 ']' + cp '/tmp/test quellordner/h' /tmp/ziel/2/ root@RoPi:/tmp#