Re: Another shellcheck rant...

Liste des GroupesRevenir à cu shell 
Sujet : Re: Another shellcheck rant...
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.unix.shell
Date : 05. Mar 2025, 23:32:25
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <vqajdp$ca0$1@news.xmission.com>
References : 1 2
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <20250305104105.793@kylheku.com>,
Kaz Kylheku  <643-408-1753@kylheku.com> wrote:
On 2025-03-05, Kenny McCormack <gazelle@shell.xmission.com> wrote:
I have a loop like:
>
    exec 3< somefile
    while read -ru3 fn; do
ffmpeg -i "$fn" ... "OutDir/$fn"
    done
>
Shellcheck flags both the "read" and the "ffmpeg", with messages to the
effect that ffmpeg might swallow up stdin - not realizing that the -u3
means the "read" is not reading from stdin.
>
Maybe the shellcheck code does know about -u, but simply doesn't
recognize it when it is clumped like that, together with another
option and its own argument.

No, it's the same with just -u3.  In fact, the original code (that I ran
through shellcheck) had just -u3.  I added the 'r' later on.

I suppose I could try: -u 3
but that's not really the point.
--
The scent of awk programmers is a lot more attractive to women than
the scent of perl programmers.

      (Mike Brennan, quoted in the "GAWK" manual)

Date Sujet#  Auteur
5 Mar 25 * Another shellcheck rant...5Kenny McCormack
5 Mar 25 `* Re: Another shellcheck rant...4Kaz Kylheku
5 Mar 25  +- Re: Another shellcheck rant...1Janis Papanagnou
5 Mar 25  +- Re: Another shellcheck rant...1Kenny McCormack
5 Mar 25  `- Re: Another shellcheck rant...1Kenny McCormack

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal