Tomasz Pala via Postfix-users wrote in <061f7d25-03bc-424c-baf3-3126ab24e...@mediasat.pl>: |On 2024-12-20 01:33, Tomasz Pala via Postfix-users wrote: |> |> This seems wrong: |> |> if [ ! "$set" ]; then
i think this is right for sh(1). This is because [] with the basic set of arguments is very exactly defined for compatibility reasons. See test(1) which states STRING equivalent to -n STRING And then [ ! "" ] is ok. (Even though *i* shiver when i see the unary !, somewhen somewhere there was a shell buggy regarding this, why i still, after many years, say things like if xy; then :; else BLA; fi instead. Only slowly getting away from that. |...not mentioning using reserved word as a variable. Hm, but a variable has the dollar prefix, so it shouldn't clash. Only saying. |Same here: | { while read name type x x chroot x x cmd x; do | |- don't use "type" and "chroot", unless you want "funny" mistakes some |day. There is a _underscore convention. I have not looked at the script other than what you say, and it is likely i would not do it like so. But other than that the shell has a grammer and then all these are argument i would think. But what really interests me: do you have an example shell which bails for this? I no longer carry any shells around except bash, dash, busybox (and what is there by default in the VM systems, ie ksh in OpenBSD etc). --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) | |In Fall and Winter, feel "The Dropbear Bard"s pint(er). | |The banded bear |without a care, |Banged on himself for e'er and e'er | |Farewell, dear collar bear _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org