help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cat inside find utility to start search directory list in a file


From: Alex fxmbsw7 Ratchev
Subject: Re: cat inside find utility to start search directory list in a file
Date: Thu, 2 Sep 2021 15:03:14 +0200

that -- is kind of base as -a --arg style args into unix sources, to
separate em together

On Thu, Sep 2, 2021, 15:02 Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com> wrote:

> another option instead of cpu intense <pe> the simpler -- argument may be
> passed
>
> p=--path
> find -- $p ( or "$p" if content of $p is more complicated )
>
> expected: no error no such option --path, expected error path --path not
> found
>
> On Thu, Sep 2, 2021, 14:38 Emanuele Torre <torreemanuele6@gmail.com>
> wrote:
>
>> Also, in general, consider using this over just "${loc[@]}":
>>
>> find "${loc[@]/#-/./-}" ..
>>
>> because, for example, if a path is relative and starts with "-", it will
>> be
>> interpreted by find(1) as an option/predicate instead of being
>> interpreted as a
>> path.
>>
>> This is a pitfall of find(1).
>>
>> Cheers,
>> emanuele6
>>
>> On 2 September 2021 08:14:11 CEST, Alex fxmbsw7 Ratchev <
>> fxmbsw7@gmail.com> wrote:
>>>
>>> mapfile -t loc <file
>>> find "${loc[@]}" ..
>>>
>>> file ( or data ) may also contain \0s instead of \ns as separator, then
>>> just do -d '' on mapfile
>>>
>>> On Thu, Sep 2, 2021, 07:23 Budi <budikusasi@gmail.com> wrote:
>>>
>>>  Tried have find utility to start search directory listed in a file:
>>>>
>>>>   find "`cat a.txt`"
>>>>
>>>>  can't go right
>>>>  As the dir. names contains space
>>>>  Please help to solve
>>>>
>>>>
>>>>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]