[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: |
Mon, 18 Oct 2021 17:32:42 -0400 |
On Sat, Oct 16, 2021 at 10:10 PM tolugboji <tolugboji@protonmail.com> wrote:
>
>
> nf=$( echo "$fnam" | awk -F '-' '{print NF}')
> ifld=$(( nf + 1 ))
>
>
>
if you're using NF like this, you don't want to add 1, you're ending up
with a value that's too high. I wouldn't get awk involved here, just do
nf=${fname//[!-]}; ifld=$((${#nf}+1)). Much faster.
- Loop with files coming through sorted by name, (continued)
- 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, 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/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 <=
- 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
- Loop with files coming through sorted by name, tolugboji, 2021/10/19
Re: Loop with files coming through sorted by name, Dennis Williamson, 2021/10/15