'Find' inside loop buggy, incorrectly make up dir.
From:
Budi
Subject:
'Find' inside loop buggy, incorrectly make up dir.
Date:
Fri, 1 Jan 2021 18:12:32 +0700
find or bash or anything has made a bit buggy behavior
for n in dircopy dircopy1 ;{
sudo find /usr/bin /usr/local -regextype posix-extended -iregex
'.*|.*' '(' -type d '(' -path '* *' -printf ''\''%p/'\''\n' -o -printf
'%p/\n' ')' -o '(' -path '* *' -printf ''\''%p'\''\n' -o -printf
'%p\n' ')' ')' -exec cp -r '{}' "$n" ';'
}
find make up bin dir. inside dircopy and target results are put there
instead of on dircopy