Re: Passing directories and files

2022-05-25 Thread goncholden
Although if I know the filename, I would not need to call the find command, and just pass the filename to HEAD, TAIL, or AWK. Sent with Proton Mail secure email. --- Original Message --- On Thursday, May 26th, 2022 at 6:51 AM, goncholden wrote: > This means that I can use >

Re: Passing directories and files

2022-05-25 Thread goncholden
This means that I can use find $filename -type f -print0 with no harm? Sent with Proton Mail secure email. --- Original Message --- On Thursday, May 26th, 2022 at 6:32 AM, Bernhard Voelker wrote: > On 5/25/22 19:53, goncholden wrote: > > > Customarily people use the

Re: Passing directories and files

2022-05-25 Thread goncholden
Customarily people use the -name option for specific file names. Sent with Proton Mail secure email. --- Original Message --- On Thursday, May 26th, 2022 at 5:50 AM, goncholden wrote: > Was it designed to function with filenames then? > > > > > Sent with Proton

Re: Passing directories and files

2022-05-25 Thread goncholden
Was it designed to function with filenames then? Sent with Proton Mail secure email. --- Original Message --- On Thursday, May 26th, 2022 at 5:35 AM, Bernhard Voelker wrote: > On 5/25/22 14:08, goncholden via Bug reports for the GNU find utilities wrote: > > > I am us

Passing directories and files

2022-05-25 Thread goncholden via Bug reports for the GNU find utilities
I am using the FIND command on a number of directories stored in FDIR array to execute HEAD on each file. How can I adapt the code so users can also include files as well as directories? hn=8 nf=${#fdir[@]} for (( i=0 ; i < $nf ; i++ )); do find "${fdir[$i]}" -type f \ -exec head -v -n "$hn" '{}