4 ms·
Am I missing something, like `bc` can parse `one + two`? Input sanitizing should be done before trying to hand inputs over to be summed.
by sgarland 2y ago
Am I missing something, like `bc` can parse `one + two`?
Input sanitizing should be done before trying to hand inputs over to be summed.
- chme 2y agoThe amber source of that is [here](https://docs.amber-lang.com/basic_syntax/basic_syntax https://docs.amber-lang.com/basic_syntax/basic_syntax) and contains: // Define variables let name = "John" let age = 30 // Display a greeting echo "Hello, my name is {name}" // Perform conditional checks if age < 18 { echo "I'm not an adult yet" } else { echo "I'm an adult" } So there is no input, everything is known statically. No sanitation required. Any additional checks done by amber in the bash code is unnecessary.