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: Emanuele Torre
Subject: Re: cat inside find utility to start search directory list in a file
Date: Thu, 02 Sep 2021 14:38:07 +0200
User-agent: K-9 Mail for Android

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]