Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
Re: [opensuse] Quick question: how to call a script function from "find"?
On 2017-06-13 14:02, Bernhard Voelker wrote:
On 06/13/2017 01:42 PM, Carlos E. R. wrote:
On 2017-06-13 09:19, Per Jessen wrote:
Carlos E. R. wrote:

to a single "find". And calling a function in the same script seemed
to me the clearest way of doing it.

I usually tend towards 'xargs' because it can be parallelised, but in
this case, I would probably do this:

find /home/cer/Fusion/Videos/ -type d |\
while read d;
sudo chown cer:cer $d
chmod u+r+w+x,g+w+x,o+r-w-x,+t $d
sudo chown cer-g:cer $d

Ah, nice :-)

yes, as long as you use quotes around "$d", and as long as there
are no even more weird characters in the directory names like newlines.

I wouldn't put it past the TV industry ;-)

Cheers / Saludos,

Carlos E. R.
(from 42.2 x86_64 "Malachite" at Telcontar)

< Previous Next >