#!/bin/bash ORDNER="$1" test -d "$ORDNER" || exit cd "$ORDNER" LISTE=$( for datei in $( find . -maxdepth 1 -type f ); do stat -c %u $datei done | sort -nu | tr "\n" "," ) LISTE=${LISTE%,} printf "Owners(%s) = %s\n" $ORDNER $LISTE