Another shellcheck rant...

Liste des GroupesRevenir à cu shell 
Sujet : Another shellcheck rant...
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.unix.shell
Date : 05. Mar 2025, 15:51:17
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <vq9od5$18ps$2@news.xmission.com>
User-Agent : trn 4.0-test77 (Sep 1, 2010)
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.

It recommends using the -nostdin option on ffmpeg, which is weird.  It is
weird that it doesn't understand what -u3 means (which, I get, is
bash-specific, but shellcheck is supposed to know about bash-specific
things), yet it *does* know about an obscure option of an obscure program
called "ffmpeg".

Odd...

Anyway and FWIW, I ended up adding -nostdin, which seems reasonable based
on my reading of the "ffmpeg" man page, and does shut up both shellcheck
messages.

--
b w r w g y b r y b

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