1 |
On 2016-09-03 11:52, Meino.Cramer@×××.de wrote: |
2 |
|
3 |
> Is there any trick/option/whatever to get the files with spaced |
4 |
> filenames processed by md5sum in combination with 'locate'? |
5 |
|
6 |
In case neither "find -exec +" nor "locate -0" existed (both of which |
7 |
others in this thread have already pointed out), I would do it like this: |
8 |
|
9 |
locate foo | awk '{ gsub(/ /,"\\ ",$0); print "md5sum " $0 }' | sh |
10 |
|
11 |
Note that this is only one extra process (the awk) over and above the |
12 |
md5sum invocations. I expect the overhead is minimal, and perhaps this |
13 |
is even competitive with the straight "find" solution. |
14 |
|
15 |
-- |
16 |
Please *no* private Cc: on mailing lists and newsgroups |
17 |
Why does the arrow on Hillary signs point to the right? |