A shell in Rust could be really cool
A shell in Rust could be really cool
Posted Feb 14, 2025 23:51 UTC (Fri) by himi (subscriber, #340)In reply to: A shell in Rust could be really cool by taladar
Parent article: Rewriting essential Linux packages in Rust
The constraints of shell arithmetic are a thing that has bitten me far too often (I've resorted to feeding stuff through `bc -l`, and occasionally even running calculations through python one-liners), but this is one I've never managed to run into - how exactly does this manifest?
A few simple experiments with bash suggest "08" used in an arithmetic expansion will error ('bash: 08: value too great for base (error token is "08")') - pretty much what I'd expect, though it'd take me by surprise the first time it happened (at least the error is nice and informative). Are you talking about something like iterating through 0-padded numeric months and hitting errors once you hit August?
