no match should be no string ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hello people,

I'm porting scripts from zsh to dash using version
0.5.11+git20200708+dd9ef66-5 from debian and
surprised to realize that the result of a glob failure is the glob
itself (when i expected an empty string).

    for it in *.txt; do gzip $it; done
    ERR: gzip: *.g: No such file or directory

    note () >&2 echo "$@"
    rm -rf *.g
    set *.g
    case $#
        in (0) echo ok
        ;; (*) echo nope
    esac
    ERR: nope

not only unexpected but it also make it harder to deal
with.  i found nothing about that in the manual
so before i dig into the code and provide a patch,
i would like to know if this is an expected behavior
with a rationale in it (like a bug to bug clone or
POSIX compliance).

regards,
-- 
Marc Chantreux
Direction du numérique de l'Université de Strasbourg
Pôle de Calcul et Services Avancés à la Recherche (CESAR)
http://annuaire.unistra.fr/p/20200




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux