#!/usr/bin/bash set -euo pipefail readarray -t synced_folders_ids < <(syncthing cli config folders list) declare -a synced_folders_paths for f in "${synced_folders_ids[@]}"; do synced_folders_paths+=("$(syncthing cli config folders "$f" path get)") done find "${synced_folders_paths[@]/#'~'/$HOME}" -name '*sync-conflict*'