[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Loop with files coming through sorted by name
From: |
Daniel Mills |
Subject: |
Re: Loop with files coming through sorted by name |
Date: |
Sat, 16 Oct 2021 13:32:37 -0400 |
On Sat, Oct 16, 2021 at 12:17 PM tolugboji <tolugboji@protonmail.com> wrote:
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
>
> On Saturday, October 16th, 2021 at 1:31 PM, Greg Wooledge <
> greg@wooledge.org> wrote:
>
> > 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...).
>
>
> In general, files are described by
>
> ${fnam}-NUM.png
>
> Would it be possible to sort the files by number if I have the situation
>
> schimmel-1.png
> schimmel-2.png
> ...
> schimmel-13.png
>
> The number of png files could be in the thousands.
>
>
find ... -print0 | sort -zt '-' -k 2,2n | while IFS= read -rd '' file; do
...
- Loop with files coming through sorted by name, tolugboji, 2021/10/15
- Re: Loop with files coming through sorted by name, Seth David Schoen, 2021/10/15
- Re: Loop with files coming through sorted by name, Seth David Schoen, 2021/10/15
- Re: Loop with files coming through sorted by name, Greg Wooledge, 2021/10/16
- Loop with files coming through sorted by name, tolugboji, 2021/10/16
- Re: Loop with files coming through sorted by name,
Daniel Mills <=
- Loop with files coming through sorted by name, tolugboji, 2021/10/16
- Re: Loop with files coming through sorted by name, Daniel Mills, 2021/10/16
- Re: Loop with files coming through sorted by name, Dennis Williamson, 2021/10/16
- Loop with files coming through sorted by name, tolugboji, 2021/10/16
- Re: Loop with files coming through sorted by name, Daniel Mills, 2021/10/18
- Re: Loop with files coming through sorted by name, Greg Wooledge, 2021/10/18
- Loop with files coming through sorted by name, tolugboji, 2021/10/18
- Re: Loop with files coming through sorted by name, Chet Ramey, 2021/10/18
- Loop with files coming through sorted by name, tolugboji, 2021/10/18
- Re: Loop with files coming through sorted by name, Chet Ramey, 2021/10/19