Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
Re: [opensuse] Quick question: how to call a script function from "find"? - using parallel
On 2017-06-14 13:53, Per Jessen wrote:
Carlos E. R. wrote:


[snip]
script is:

#!/bin/bash

#find /home/cer/Fusion/Videos/ -type d \
# -exec sudo chown cer:cer '{}' \; \
# -exec chmod u+r+w+x,g+w+x,o+r-w-x,+t '{}' \; \
# -exec sudo chown cer-g:cer '{}' \; \
# -exec sudo setfacl -m u:wwwrun:rx '{}' \;

find /home/cer/Fusion/Videos/ -type d | parallel parallel "sudo chown

one too many 'parallel's ? typo?

Oops.

Corrected, but still fails:

cer@Isengard:~/Fusion> time ./_Cambiar_permisos_Videos
Academic tradition requires you to cite works you base your article on.
When using programs that use GNU Parallel to process data for publication
please cite:

O. Tange (2011): GNU Parallel - The Command-Line Power Tool,
;login: The USENIX Magazine, February 2011:42-47.

This helps funding further development; and it won't cost you a cent.
If you pay 10000 EUR you should feel free to use GNU Parallel without citing.

To silence the citation notice: run 'parallel --bibtex'.

chown: cannot access '/home/cer/Fusion/Videos/Buffy,\ cazavampiros/Temporada\
7': No such file or directory
chown: cannot access '/home/cer/Fusion/Videos/Buffy,\ cazavampiros': No such
file or directory
chown: cannot access '/home/cer/Fusion/Videos/Major\ Crimes': No such file or
directory
chown: cannot access '/home/cer/Fusion/Videos/Major\ Crimes/Temporada\ 5': No
such file or directory
...
chown: cannot access '/home/cer/Fusion/Videos/Twin\ Peaks/Temporada\ 3': No
such file or directory
/bin/bash: -c: line 0: unexpected EOF while looking for matching `''
/bin/bash: -c: line 1: syntax error: unexpected end of file
/bin/bash: -c: line 0: unexpected EOF while looking for matching `''
/bin/bash: -c: line 1: syntax error: unexpected end of file
chown: cannot access '/home/cer/Fusion/Videos/Warehouse\ 13': No such file or
directory



#!/bin/bash

#find /home/cer/Fusion/Videos/ -type d \
# -exec sudo chown cer:cer '{}' \; \
# -exec chmod u+r+w+x,g+w+x,o+r-w-x,+t '{}' \; \
# -exec sudo chown cer-g:cer '{}' \; \
# -exec sudo setfacl -m u:wwwrun:rx '{}' \;

find /home/cer/Fusion/Videos/ -type d | parallel "sudo chown cer:cer '{}' &&
chmod u+r+w+x,g+w+x,o+r-w-x,+t '{}' && sudo chown cer-g:cer '{}' && sudo
setfacl -m u:wwwrun:rx '{}'"


Changed to:

find /home/cer/Fusion/Videos/ -type d | parallel --bibtex "sudo chown cer:cer
'{}' && chmod u+r+w+x,g+w+x,o+r-w-x,+t '{}' && sudo chown cer-g:cer '{}' &&
sudo setfacl -m u:wwwrun:rx '{}'"


Thousands of overflowing the display buffer:

Type: 'will cite' and press enter.

Type: 'will cite' and press enter.

Type: 'will cite' and press enter.

Type: 'will cite' and press enter.

Type: 'will cite' and press enter.

Type: 'will cite' and press enter.




I have never seen such obnoxious thing in an opensource FREE program... :-(




--
Cheers / Saludos,

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

< Previous Next >