Hi Alexey, On 11/27/22 12:41, Alexey wrote:
On 2022-11-26 21:45, Alejandro Colomar wrote:That was my gut; thanks! I'll workaround with $#.I could suggest you to use for clarity another construction: [[ ${1+isset} ]] || echo "not set"Here "isset" is just for readability. You could place any other string literal there.
I actually find that very confusing. What feature is it using? I couldn't find it with `info bash | less` then `/\+`.
test $# -ge 1 has the benefit that it's just a sed(1) away from my old test -v 1 And it only needs the following to be understood: man test | grep -A1 ' -ge ' man sh | grep ' # ' The old version (test -v 1) required: help test | grep ' -v ' man sh | sed -n '/^ Positional/,/^$/p' Both are easy to find.
Regards, Alexey.
Cheers, Alex -- <http://www.alejandro-colomar.es/>
OpenPGP_signature
Description: OpenPGP digital signature