help-bash
[Top][All Lists]
Advanced

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

Re: Loop with files coming through sorted by name


From: Greg Wooledge
Subject: Re: Loop with files coming through sorted by name
Date: Sat, 16 Oct 2021 09:31:11 -0400

On Fri, Oct 15, 2021 at 08:31:04PM -0700, Seth David Schoen wrote:
> You can thus do
> 
> readarray -d "" myarray < <$(find . -type f -print0 | sort -zn)
> for i in "${myarray[@]}"; do
>   # arbitrary shell stuff with "$i"
> done

You've got an extraneous $ in there.  It's <(find...) not <$(find...).



reply via email to

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