Re: Another shellcheck rant...

Liste des GroupesRevenir à cu shell 
Sujet : Re: Another shellcheck rant...
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.unix.shell
Date : 05. Mar 2025, 19:55:10
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vqa6me$2hrdp$1@dont-email.me>
References : 1 2
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 05.03.2025 19:50, Kaz Kylheku 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.

This is actually what I had just tried out of curiosity (with that
tool that I never used); the result is the same for 'read -r -u3'.

Janis


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