3 ms·
What shell are you using? For bash, that's got to be $(( $my_number + 1 ))
by jbaber 3y ago
What shell are you using? For bash, that's got to be $(( $my_number + 1 ))
- Rygian 3y agoIt was pseudo-code :-)
- tetris11 3y agoI always titter when I see arithmetic in shell operations. In Python, one would merely do: export mynumber="+4912341234123" python3 -c "import pip; pip.main(['install', 'phonenumbers']); \ import phonenumbers; x = phonenumbers.parse(\"$mynumber\", None); \ x.national_number = x.national_number + 1; \ print(x)" Just plain and simple, really.