This is actually not a bash-ism.William Park via Talk wrote on 2025-08-17 21:51:It's arithematic expression, so an easy way to remember: number 0 --> returns 1 ("fail") number non-0 --> returns 0 ("success")You're right, once one knows about it it's easy to remember. But it's highly counter-intuitive (*who* here knew about this behaviour before this thread?). And bash is littered with such weirdness.
-- Alvin Starr || land: (647)478-6285 Netvel Inc. || home: (905)513-7688 alvin@netvel.net ||